LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

if condition


@fairy55 wrote:

hi!

i have another problem now.

r1= 1 2 3 

       4 5 6

r1(: )= 1

          4

          2

          5

          3

          6

how can it possible in l.v?

thnx


This is pure gibberish without more explanations. Try to add a few more words. is r1 a 2D array?

 

if you have a 2D array

 

1 2 3

4 5 6

 

And you want a 1D array

 

1 2 3 4 5 6

 

All you need os to reshape into a 1d array having a length correponding to the product of the two dimension sizes of the 2D array.

0 Kudos
Message 11 of 15
(1,062 Views)

@altenbach wrote:

@fairy55 wrote:

hi!

i have another problem now.

r1= 1 2 3 

       4 5 6

r1(: )= 1

          4

          2

          5

          3

          6

how can it possible in l.v?

thnx


This is pure gibberish without more explanations. Try to add a few more words. is r1 a 2D array?

 

if you have a 2D array

 

1 2 3

4 5 6

 

And you want a 1D array

 

1 2 3 4 5 6

 

All you need os to reshape into a 1d array having a length correponding to the product of the two dimension sizes of the 2D array.


Since it looks like you want to order in colums, you will need to use Transpose 2D Array before doing the resize.


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 12 of 15
(1,049 Views)

r1 is a 2-d array and r1( : ) is a 1 d array that has all elements of r1 verticaly in a way that 2nd column is appended after the first one and the 3rd after the 2nd one.

 

0 Kudos
Message 13 of 15
(1,017 Views)

Transpose 2D Array to give columns priority then Reshape Array to a 1D array.

 

Reshape.png

 

Lynn

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

@fairy55 wrote:

r1 is a 2-d array and r1( : ) is a 1 d array that has all elements of r1 verticaly in a way that 2nd column is appended after the first one and the 3rd after the 2nd one.


LabVIEW does not distinguish between 1D row arrays and 1D column arrays (you can resize the control\indicator vertically or horizontally, but that is just cosmetic). If you later want to append more columns, you might be better off creating a 2D array with one column.

 

You seem to be creating duplicate threads at a fast pace, so a sufficient solution is described here.

0 Kudos
Message 15 of 15
(1,009 Views)