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

Good morning, I need help please. Pardon my English is not very good.I have 2D array in which each value describes a waveform, I need an interval of time elapsed to determine the maximum and minimum each array element was.

0 Kudos
Message 1 of 43
(7,387 Views)

Let me try to rephrase your question:  one dimension is time, the other some arbitrary index (say, which 1D waveform you are looking at). You want to determine the time of the maximum value and that of the minimum value for each individual waveform and return this as an interval (a pair?) for each waveform? Or you want to find the maximum value over all waveforms, the minimum value over all waveforms and then return their time points?

0 Kudos
Message 2 of 43
(7,371 Views)

It is an arrangement of 4 rows by 25 columns, each element is a value of a waveform in an instant of time t. I need to get the maximum and minimum value of each array element for a time interval delta t. Now you understand

0 Kudos
Message 3 of 43
(7,359 Views)

Hi

 

You might be refering to something like that in the attached screenshot.

The first function will obtain the array of each waveform values and obtain min and max among the entire array.

The second will do the same thing, with a readily available VI.

 

 

The third one will give you min and max in a selected subset of the entire array. You have got to set the 'dt' interval input to the number of samples within your desired interval.

 

Hope this will help

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 4 of 43
(7,352 Views)

To the original poster: it is amazing how thick I can be, but in fact, no, I still don't exactly  understand what you mean, as there is now a new concept: dt. Is it a parameter of the search or is it what you want returned? I guess Freelance LV's answer may satisfy your needs, but just as a friendly advice (please don't be offended by it, I have made the same mistake myself in the past), try to not assume that people on this forum read minds...

0 Kudos
Message 5 of 43
(7,343 Views)

MaxMin2DArray.PNG

 

This may not work perfectly but it a start so you can play with at your own risk. You need to add a second MinMax function to make this work. The way it is now only give you the Max value.

0 Kudos
Message 6 of 43
(7,333 Views)

OK, after a second look here's the soln, but you may have problem with this on initialization! You decide.

 

MaxMin2DArray2.PNG

0 Kudos
Message 7 of 43
(7,325 Views)

Thanks for solution, the test and then comment. But I see in the solutions which output is only one element with maximum value and a minimum value and should be an array of minimum value and array of maximum value.

0 Kudos
Message 8 of 43
(7,295 Views)

I send the vi part where it appears in the arrangement in question.

0 Kudos
Message 9 of 43
(7,290 Views)

@Redney wrote:

I send the vi part where it appears in the arrangement in question.


Hi

 

I tried my best to understand your first post and give a probable code. You later posts need more information to understand what you want. You have an array of min and max values in the image I have given. And the iamge you posted has two 2D arrays, WaveformData and WaveformCharts.

 

Please be more clear as to what min and max values you want and the meaning of 'interval of time elapsed'.

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 10 of 43
(7,279 Views)