09-25-2005 04:16 AM
09-25-2005 04:28 AM
The right part of your code doesn't do anything. It checks to see if the Max is bigger than the Min (always yes, unless it happened to be equal, in which case it won't matter) and then takes the max. Instead, wire the max output directly into the SR.
You can duplicate this code, using another SR, to get the minimum value.
If you don't need to have the values inside the loop, you can get rid of the SR and wire the random # directly out of the loop, which will build the numbers into a 1D array. Then, look inside the array palette to find the min and max.
09-25-2005 09:16 AM
09-25-2005 09:29 AM
09-25-2005 09:33 AM
I have attched this VI, what about this one. please let me know.
Thanks
09-25-2005 12:12 PM
That's not it either. What I suggested was two SRs - one to hold the minimum value and one to hold the max. Then, you wire the random # into 2 Min\Max VIs (not the array min\max) and take the minimum from one and the maximum from the other.
Note that you will need to init the min SR to a high number. You should also change its representation to DBL to avoid coercions inside the loop. Other tips would be to set LV to place terminals not as icons and to replace the express VI with a wait VI which will have 1000 wired into it.
09-26-2005 04:55 AM
10-07-2005 03:59 AM
I guess you may use:
Analyze\Point By Point\Probability and Statistics Point By Point\Array Max&Min PtByPt.vi
You can wire the random number directly to the input, and define how 'current' the peaks are by defining the sample length. Remember to initialize this vi when the loop count is zero.
Hope it works.
10-07-2005 07:33 AM