‎08-18-2011 07:56 AM
For example, Im trying to create an array that has 1 column of 4 elements with 1 row of 4 elements hence 'L-shaped' but this doesn't seem possible unless you fill the rest of the array with 0s? Which I don't want. I tried using 'replace array subset' to insert the row of 4 elements into the column of 4 elements & vice versa, but that didn't work out. Is there any way around this?
Solved! Go to Solution.
‎08-18-2011 07:58 AM
Seems to be an off-shoot of this: http://forums.ni.com/t5/LabVIEW/Making-a-2D-array-triangle/m-p/1656134
2D arrays must be rectangular. If you need to do something like that then you'd need to use something like a cluster.
‎08-18-2011 09:10 AM
Yeah... not quite the same, creating clusters won't work for the program I'll just think of something else then, was just wondering if there was some kind of way to have non-rectangular 2D array.
‎08-18-2011 09:11 AM
If you can give some background on why you need an L-shape, someone can probably offer a suggestion to solve your problem. (if smercurio's idea about clusters doesn't work)
‎08-18-2011 11:17 AM
If your array is numeric, you could init the array with NaN then fill in elements as needed. It's pretty easy to filter NaN later in your code, and some functions do it automatically.
‎08-19-2011 08:07 AM
I wish to extract portions of an array, depending on certain variables which determines the boundaries for the portion I want to extract. In some cases it might just be a rectangular section of an array that needs to be extracted, in other cases it is an L-shaped portion of the array that needs to be extracted.
‎08-19-2011 08:09 AM
It is numeric. I think I tried something similar to this for a related section of the program, but it became a bit of a muddle removing NaNs cause then Labview would auto-resize the array (when I didnt want it to) once you filtered the NaNs from the array.