LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does this loop create a 3D array instead of a 2D?

Hi,

 

This should be a relatively simple question. I am feeding a 1-D array (1 x 801) in a loop into a build array function and looping it back on itself to build the array. I am rather confused as to why this is producing a 3D array, can someone explain why?

 

Thank you,

Michael

0 Kudos
Message 1 of 5
(3,769 Views)
Where are you seeing the 3D array? If it is at the far right of the diagram, at the edge of the FOR loop, it is because you have the autoindexing set, which is going to make a 1D array of your 2D array data, a 3D array. As the two sub-vi's didn't come with your vi I don't know what the one with the "17" as an input does, nor what the other one does either, other than apparently produce two 1D arrays.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 5
(3,763 Views)
Ravens Fan already answered your question here. Was the answer not clear? What did you not understand? Since you don't have the initializer terminal wired you are getting the default behavior. If you want a concatenation to occur you need to wire an empty 1D array to the initializer terminal of the Feedback Node.
0 Kudos
Message 3 of 5
(3,757 Views)

Amazing!

 

That sounds exactly like the same answer I gave to the same question by the same person here.!  I really don't know why a new thread would need to be created to ask a question that was already answered.

0 Kudos
Message 4 of 5
(3,751 Views)

Hi again,

 

I am sorry for my misunderstanding before. I read your post and it took me until now for how auto-indexing was actually working in this situation. Sorry about that.

 

Michael

0 Kudos
Message 5 of 5
(3,741 Views)