LabVIEW Idea Exchange

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

Array Size with Input-Terminal to choose dimension.

Status: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined. 

The "Array Size" Function returns an ARRAY of all dimensions (even for a 1-dim array!). Very, very often, I'm interested only to know ONE of the dimensions. I normally do "Array size" - "array to cluster" (with the cluster set to the number of dimensions) - "unbundle cluster"  => wich is very clumsy.

 

Why not make the "Array size" customisable, e.g. with a double click like the "array to cluster" to indicate which dimension I want to know. If "all" is choosen, an array is returned as today. If "2" is choosen, the 3rd dimension is returned just as an integer value ...

 

would be great!

 

gilles

2 Comments
altenbach
Knight of NI

> The "Array Size" Function returns an ARRAY of all dimensions (even for a 1-dim array!).

 

This is incorrect. For a 1D array, a scalar, not an array is returned.

 

> I normally do "Array size" - "array to cluster" (with the cluster set to the number of dimensions) - "unbundle cluster"  => wich is very clumsy.

 

Well, this really is clumsy!! A better way is a simple index array resized to the correct number of outputs. If you only want one of the dimensions, use index array with only one output and with a specific index wired.

 

There is also this idea, which seems quite nice for some specific scenarios.

For 2D arrays, you can also use the matrix size function.

Darren
Proven Zealot
Status changed to: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined.