LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

get matrix elements

i have  matrix ( 4 columns) and i want to  apply  different arithematic operations on each column .

how can i do that ???

thanks

0 Kudos
Message 1 of 5
(2,660 Views)

Hi oi,

 

do you actually have a matrix or just a simple 2D array? That is quite a difference in LabVIEW, please use exactly the label that is shown in the context help! (Or show a picture or even better a VI!)

 

Use either IndexArray, GetSubmatrix - or simple autoindexing of a FOR loop!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,659 Views)

i have matrix 51*4 and want to get each coloums as 1-D array??

0 Kudos
Message 3 of 5
(2,649 Views)

Hi oi,

 

I already proposed several solutions. Have you tried any of them?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(2,644 Views)

As mentioned, Index array allows you to get rows or colums of a 2D array if you leave one index disconnected.

 

To get columns, you need to wire the lower index of the two. Here's example code to get the first four columns of a 2D array.

 

 

How different are the arithmetic operations you want to apply? Can you show us a typical example? There are probably ways to do it all at once.

0 Kudos
Message 5 of 5
(2,637 Views)