04-02-2013 07:55 AM
Please see the attached picture for reference, since I am not sure if I expressed myself correctly in English. My current waveform looks like the gray waveform, and I would like to convert it to the red waveform. Can anyone tell me how to do this in Labview? Thank you for your help!
04-02-2013 08:08 AM - edited 04-02-2013 08:10 AM
04-02-2013 09:08 AM - edited 04-02-2013 09:09 AM
@GerdW wrote:
Hi Laura,
next time you should attach real pictures like PNG...
You could use a combination of Quotient&Remainder with Multiply to get your desired "discrete" waveform!
Dividing and multiplying will reduce the data to the nearest multiple of 5, but the red line shows that the data is not discretised in the y domain but instead in the x domain, ie the time domain has been chopped.
To achieve this it seems you need to be selecting every nth data point, which is similar to downsampling your data. You can achieve this with the Align & Resample Express VI
http://zone.ni.com/reference/en-XX/help/371361J-01/lvexpress/align_and_resample/
04-02-2013 09:11 AM
You can also use Decimate Array from the array pallete. Set it up for, lets say 5 outputs, and it splits a 1D array into 5 separate 1D arrays. Simply throw away 4 of them and you now have a 1D array with every 5th datapoint from your original array.
This restricts you to a set data point spacing so you'll need to decide if that's ok.
04-02-2013 09:12 AM
I would use the Decimate Array. Can you share some code so we can see where you are at?