LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
Gogineni

Detailed Array Size Function

Normally in a multidimensional array, to obtain the number of elements in the corresponding dimension we need to use two array functions namely the array size as well as index array functions. Instead if a single function is provided like the one shown below would be more useful. The new function can be a replacement to the existing array size function with an additional feature which eliminates the use of index array function to get individual dimension values.  

This may not be the case with all, but as a beginner I used to get confused many times which element of 1D array generated from array size function corresponds to rows/columns.  So a function similar to the cluster function (unbundle by name) would be very easy for a developer to use and there will be no chance of confusion.

Based on the dimension of the input array connected to this, the function should automatically add/remove the unnecessary items.

Example: If the input array is a 2D array, then ‘No of Pages’ item should not appear. If the input array is a 1D array, then only ‘Array Dimension’ should appear. The developer can also be provided with option to select their item of interest (drag/reduce) in case of a multidimensional array.

 

The last item ‘Array Dimension’ is to retain the existing functionality and provide an array of dimensions.

 

ArrayNode.png

______________________________________________
Kudos are welcome
5 Comments
Intaris
Proven Zealot

No votes for me.  "Row" "Column" and "Page" seem completely arbitrary descriptions to me (Yes, I know that row and column are already assumed but I still find them pointless because not all 2D arrays are arranged in "row" and "column".

wevanarsdale
Member

This idea has been suggested by jdunham http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Simpler-quot-Array-Size-quot/idi-p/917635.

 

Okay, I'll ask.  Intaris, please give me an example of a 2D array not arranged in "row" and "column".

Intaris
Proven Zealot

You can call the dimensions of any 2D array "Row" and "Column".  But if you slice up a 3D array to take array dimensions 2 and 3, they are no longer "row" and "column" but "column" and "page" according to your idea.  Should the dimensions remember what they're called?  Of course not.  I find the descriptions of the array dimensions to be rather useless.

fabric
Active Participant

Close to this idea, but simpler (and not quite the same as any of the duplicates):

 

I'd like to see the "array size" primitive have a configurable output AND I'd like to be able to choose a cluster output instead of the default array. (Scalar would be the other obvious output configuration for 1D arrays, but that has already been suggested)

 

Is that novel enough to post as an idea?

Darren
Proven Zealot