From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add data to odd and even rows of an array

Solved!
Go to solution

Hello,

Im new on LabView Software so I need some help. I want to build an array with 2 columns and X (numeric control) rows. Ok, now i have three 1D arrays (that are built by numeric controls) to build my final array: first array goes to the row number 0, the second one goes to odd rows and the third one goes to the even rows. My problem is that with the VI I have done, I cant fill the odd and even rows correctly. If you can help I will be very grateful.

This is my code:

Download All
0 Kudos
Message 1 of 4
(2,886 Views)
Solution
Accepted by AdrianPB

Hi Adrian

I am struggling to understand what it is that you need at the moment, but to get the ball rolling does this help?

 

Insert Into Array.png

Steve

Message 2 of 4
(2,871 Views)

Perhaps you want the Interleave 1D Arrays function.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 4
(2,841 Views)

It would be better to define the number of B-C repeats, making the number of rows 2N+1.

 

Here's one possibility, I am sure it can give you some ideas. Modify as needed.

 

ArrayData.png

(Note that you need to initialize the array before the loop, and not over and over. Also, you don't need to wire the second index if it is one higher that the one above. Make sure to use the right representations for all data. Some should be blue.)

Message 4 of 4
(2,832 Views)