LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dealing With Non Uniform Array Sizes

Yes, if you have a FOR loop, the final array size is know, so preallocation might be more efficient as Lynn pointed out.

 

If you don't know the final array size (e.g. using a while loop), you code can still be simplified:

 

  1. initialize the shift register
  2. use "build array" instead of "insert into array"
  3. ...

here's how it would look like, clean up a little bit.

 

 

0 Kudos
Message 11 of 13
(508 Views)

Thank you! It seems so easy now..

0 Kudos
Message 12 of 13
(483 Views)

So I'm down to the last step. The program I've attached does what I want except I can't plot the final array. I apologize if the programming is messy, I'm just trying to throw this together before the day is over.

 

So to clarify I'm just trying to plot the "element" cluster. I need to convert it to something the graph can read but it's telling me "You have connected to a polymorphic terminal that does not accept this wire type " When I try to convert it to an array.

 

 

EDIT: I've got it. Just needed to unbundle it. Thanks everyone!

0 Kudos
Message 13 of 13
(473 Views)