06-06-2017 02:18 AM
Hello.
In the attached file, referring to 'Array Size' I understand second and third row elements indicate number of rows and columns respectively. But what does the first element indicate?
Thanks.
06-06-2017 02:59 AM
Hello,
here you will find some details on multidimensional array:
The 1 in array size, stands for the dimension.
The 5 stands for row,
The 4 stands for column number.
If you want to understand more about it, you can click on the arrow close to the 0 and increase the dimension of the array.
06-06-2017 07:59 AM - edited 06-06-2017 08:00 AM
You have a 3 dimensional array (as can be seem by the number of index terminals).
Your display shows the first slice of the 3D array and you only have 1 slice (or page) total. So you might want to ask yourself why you even need a 3D array, because a 2D array would seem sufficient to hold all data. Are you planning to add more pages later? You can easily convert it into a 2D array if you want.
So you have 1 page, 5 rows, and 4 columns.
Also be aware that the size of the array container has nothing to do with the array size. You can easily resize it to display more or fewer elements or even add scrollbars.
06-06-2017 10:06 AM
There's two concerning things with the solution accepted.
First, let's take a basic sanity check. The answer claims 1 stands for the dimension. If we look at the picture, we see an array with three dimensions. If the answer you give contradicts what you can see, it's failed the sanity check. Rather than continue to post, we should take a step back and re-evaluate our understanding.
To ensure a better understanding, I've attached a picture here.The circled part is the place where you choose two things: the number of dimensions in your array and the current origin point in your viewer. Currently, we have 3 options and thus three dimensions. If we take the idea from James and increase the dimension of the array, you wouldn't see the value of 1 change. Instead, you'd see more 1 values appear to represent the new dimensions you create.
Sanity checks are very important in programming. That brings me to the second thing that concerns me about this being marked as a solution. Looking at the solution, you know you have two dimensions (and were confused about the third). If you're given an answer that doesn't make sense, question it rather than blindly accept. Any answer that states an element is telling you that you have a 1D array CAN'T be right.
The answer immediately following the "solution" is the correct answer.
06-06-2017 10:25 AM - edited 06-06-2017 10:26 AM
What we cannot determine from a DOCX picture of the front panel is how the indicator "Array Size" is getting data. An indicator created from the output of the primitive "Array Size" would have a "size(s)" label. Show code or attach the vi! Best, insert a snippet (Edit>>Create Snippet)
06-07-2017 03:11 AM
Hello,
To be more specific in my answer:
A multidimensional array can be seen like an Excel sheet. Where in your case, the 1 represents page, the 5 row, the 4 represents the number of columns.
06-07-2017 08:20 AM
JamesSouv wrote:To be more specific in my answer:
A multidimensional array can be seen like an Excel sheet. Where in your case, the 1 represents page, the 5 row, the 4 represents the number of columns.
Yes, the quoted help page was correct, but your original sentence "The 1 in array size, stands for the dimension." was incorrect and confusing.