05-25-2013 02:49 AM
@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.
05-25-2013 06:43 AM
@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.
05-26-2013 10:31 AM
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.
05-26-2013 10:43 AM
Transpose 2D Array to give columns priority then Reshape Array to a 1D array.
Lynn
05-26-2013 10:44 AM
@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.