LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reshape array

Solved!
Go to solution

OK, you don't have conditional tunnels. Just conditionally built the output in a shift regsiter instead. 😉

 

(It always helps if you tell us your LabVIEW version so we don't have to guess! )

 

See how far you get....

0 Kudos
Message 11 of 18
(1,692 Views)

Here are two possibilities. The second version has a little more code but is more efficient, especially if the arrays are large.

Message 12 of 18
(1,685 Views)
Solution
Accepted by topic author super_saiyans

altenbach ... you are too fast !!   Smiley Wink

 

mine  

 

original.png

0 Kudos
Message 13 of 18
(1,676 Views)

haha. both of you guys are fast!

 

sigh..

i created this!!

which is a mess!!

 

saying that if arrays are not the same size..delete or dont insert the array into another array..

if its the same size..then continue adding into array..

yeah..i got a lot to learn!

 

Untitled.png

Message 14 of 18
(1,669 Views)

you tried ... and that's what matters!   

0 Kudos
Message 15 of 18
(1,660 Views)
Message 16 of 18
(1,648 Views)

I wonder if you are trying to make a non-rectangular array? You are aware that it is not possible to have a 2D array in LabVIEW with rows having different lengths? That is not possible in LV, although you can "fake" it with an array of cluster of array.

 

Lynn

Message 17 of 18
(1,632 Views)

@super_saiyans wrote:

haha. both of you guys are fast!

 

sigh..

i created this!!

which is a mess!!

 

saying that if arrays are not the same size..delete or dont insert the array into another array..

if its the same size..then continue adding into array..

yeah..i got a lot to learn!


There are many things wrong with this:

  • Why do you have these local variables (4,5,6,7, etc)? Just use a wire. I assume that the arrays don't change during the execution of the loop, right? Why do you think you need to re-read the control (or local variable) with every iteration?
  • You can replace entire array subsets, no need to index out element by element.
  • output array belongs in a shift register, no local variable needed.
  • There are easier ways to tell if four values are equal. 😉 Where are these arrays coming from? Don't you also need to compare with the size of the 2D output array?
  • ...
Message 18 of 18
(1,617 Views)