12-29-2011 04:02 AM
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.
Solved! Go to Solution.
12-29-2011 03:20 PM
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?
12-30-2011 03:01 AM
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
12-30-2011 03:44 AM
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
12-30-2011 10:38 AM
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...
12-30-2011 11:52 AM - edited 12-30-2011 11:56 AM
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.
12-30-2011 12:04 PM - edited 12-30-2011 12:05 PM
OK, after a second look here's the soln, but you may have problem with this on initialization! You decide.
01-02-2012 03:39 AM
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.
01-02-2012 04:22 AM
I send the vi part where it appears in the arrangement in question.
01-02-2012 06:21 AM - edited 01-02-2012 06:21 AM
@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'.