LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

arrays with labview

Hello! I have a problem with the arrays in Labview. My array has variable dimensions, it depends of the number of channels and the number of readings I want to do. The structure is something like this:
10         15       20      40
10.1      15.1    20.1   40.1
10.2      15.2    20.2   40.2
The first row is the first reading of all the channels. All the readings in the same column correspond to the same channel, so 10 10.1 and 10.2 are three readings of channel 1, 15 15.2 and 15.3 the readings of channel 2, etc.
I want to calculate the standard deviation of every channel, but how can I do it? I can do it for all the channels, is quite easy, the problem is to separate the channels. I tried to transpond the array, but the problem is that the option only exists for a 2 D array.
I have no idea how to do it, so if someone can suggest me something I would be very happy.
Thanks for your time.
Vicente
0 Kudos
Message 1 of 4
(2,735 Views)
Hi Vicente,

you should use 'Index array' to get single columns or rows from a 2d array!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,730 Views)

Thank you!

Yes, it works with Index Array. I have to create a for loop and I wire the i to the input of the index array to change of column every iteration... and it works

0 Kudos
Message 3 of 4
(2,683 Views)
Hi Vicen,

when using a (FOR) loop you shold consider auto-indexing as well. This can make your live much easier!
Best regards,
GerdW


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