LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array Size

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.

0 Kudos
Message 1 of 7
(6,414 Views)

Hello,

here you will find some details on multidimensional array:
array.jpg
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.

Greetings and Regards,
James
0 Kudos
Message 2 of 7
(6,394 Views)

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.

Message 3 of 7
(6,354 Views)

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.

 

array forum.PNG

 

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.

Message 4 of 7
(6,325 Views)

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)


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 7
(6,316 Views)

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.

Greetings and Regards,
James
0 Kudos
Message 6 of 7
(6,285 Views)

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.

0 Kudos
Message 7 of 7
(6,268 Views)