LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Determine the maximum and the minimum value for each value of 2D array

Solved!
Go to solution

Find a solution, but it only works for the first column of the array, I need that works for all columns of the array. Annex I solution

0 Kudos
Message 11 of 43
(1,264 Views)

The arrangement with which I am working on is 2D arrays, WaveformData. In this arrangement need to extract the maximum and minimum of each element and form two arrays, one for maximum and another for minimum.

0 Kudos
Message 12 of 43
(1,264 Views)

Hi Redney,

 

a simple way to get the maxima and minima of each row in a 2d array would be:

check.png

Use a TransposeArray to get min/max of columns...

 

"need to extract the maximum and minimum of each element"

You should define what an element is to you. Usually an element of an array is a scalar value - thus the maximum nd minimum of an element is the same as the element...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 43
(1,262 Views)

The maximum and minimum arrangement is shown as a partial solution that implements only works for the first column and not the rest.

0 Kudos
Message 14 of 43
(1,261 Views)

Hi Redney,

 

still it's very vague what you really want to achieve.

 

Next try:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 43
(1,259 Views)

Redney, please give a example of the input and the expected output...

 

For example if the input is 

[[1, 2, 3],

 [4, 5, 6],

 [7, 8, 9]]

 

What is the output?

0 Kudos
Message 16 of 43
(1,266 Views)

What I need to get is the maximum and minimum of each array element. Each array element is a value in a waveform, at time t. I need to get the minimum and maximum value of each element after a time interval. Each of the maximum and minimum would be part of an array of other maximum and minimum.

0 Kudos
Message 17 of 43
(1,264 Views)

Hi Redney,

 

as said before:

- You should define what an element is to you. Usually an element of an array is a scalar value - thus the maximum and minimum of an element is the same as the element...

- Wouter asked "What is the output?"

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 43
(1,263 Views)

I know what is an element of an array. I need to get the maximum and minimum value of the variation of this element in time, you know.

0 Kudos
Message 19 of 43
(1,251 Views)

The input is an array of 4 rows by 25 columns. Each element of this arrangement describes a waveform, what I need is to get the maximum and minimum values ​​of that waveform.

0 Kudos
Message 20 of 43
(1,249 Views)