LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview combine two 1D array into 2D array and merging 2D array

Hi!!! how do I combine two 1D array into 2D array.They have the same amount of row and column. So I am trying to get 2 column of data side by side.

I also need help in merging multiple 2D array, I have multiple 2D array with 2 column. However, one of the column's data is exactly the same as other 2D array. So how do I merge all the data together?

0 Kudos
Message 1 of 15
(14,093 Views)

You can build the 1D array so that you can get 2D array. For combining 2 2D array you have to build the array and enable Concatenate inputs.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 15
(14,092 Views)

I have get the 1D array but how to combine to get 2D array?

0 Kudos
Message 3 of 15
(14,088 Views)

Just use the build array function.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 15
(14,081 Views)

I tried but the value is incorrect.

0 Kudos
Message 5 of 15
(14,076 Views)

Please post the code that you have tried.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 6 of 15
(14,074 Views)

I think this could help you :


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 7 of 15
(14,072 Views)

I have to give Kudos to TiTou for showing off video.

 

Nextal, can you give some sample data so we can see what you are trying to do?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 15
(14,061 Views)

Hi all. I am unable to show you my code now. I don't have the code with me now as it is at my workspace. Okay what I am trying to do now is is that I have a number from 0 to 255. every 5 step it will get a data from my detector. What I am doing now is to store the value in array. I had successfully build my 1D array for my data and 1D array for the number. I am not clear in expressing here is a example.

 

Number 1D array                  Data 1D array

0                                           0.9236

5                                           1.2653

10                                         1.1940

15                                         1.2691  

20                                         0.9987

25                                         1.4567

30                                         1.9746

35                                         1.3445

40                                         1.9953

.                                                .

.                                                .

.                                                .

255                                       1.4372

 

How I get all this value into a 1D array is to use a while loop with shift register and store it.

 

What I am trying to achieve now is to get a 2D array with data side by side. I am using the build array vi:

 

Combine 2D array

0     0.9236

5     1.2653

10   1.1940

15   1.2691  

20   0.9987

25   1.4567

30   1.9746

35   1.3445

40   1.9953

.         .

.         .

.         .

255  1.4372

 

I used the build array and the number from 0 to 255 show correctly. However, for my data I only get the first data 0.9236 for every number.

Any ideal why this happen??

 

What I am getting now is:

 

Combine 2D array

0     0.9236

5     0.9236

10   0.9236

15   0.9236 

20   0.9236

25   0.9236

30   0.9236

35   0.9236

40   0.9236

.         .

.         .

.         .

255  0.9236

 

0 Kudos
Message 9 of 15
(14,040 Views)

Untitled_1d.png

By the way this is how I create my 2D array.

0 Kudos
Message 10 of 15
(14,033 Views)