10-21-2014 01:22 AM
I have normalised some physiological waveforms on the Y axis (easy) but how do I normalise on the Y axis? The waveforms vary between a length of 200 to 500 datapoints.
Solved! Go to Solution.
10-21-2014 01:23 AM
Sorry - I meant to say - I have normalised some physiological waveforms on the Y axis (easy) but how do I normalise on the X axis?
10-21-2014 01:31 AM
You probably need to tell us what you mean by "normalize the x axis" (same dT, same lenght, etc.). What variable does the x-axis represent?
Can you show us some data?
10-21-2014 07:45 AM - edited 10-21-2014 07:47 AM
Waveforms have a t axis 😉
Create an array with values 0 to 1, where dx = 1 / (number of waveform elements - 1); [0dx = 0, dx, 2dx, 3dx, ... (n-2)dx, (n-1)dx = 1], where n = length(Y).
Bundle the X array and the normalized Y array from the waveform and display in XY Graph?
10-21-2014 04:07 PM
The X axis is time - the problem is that the waveforms are of slightly different lengths and so ideally I need to have them o equal lengths so that they can be compared or averaged. Two waveforms are attached in a text file.
10-21-2014 04:17 PM
Thanks - that's great. In response to Altenbach I also responded about the problem of getting the lengths of the waveform data of equal length so that the waveforms can be avaeraged.
Horizontal axis for waveforms noted as 't'
10-21-2014 04:26 PM
You simply just need to trim all datasets (e.g. using array subset) to cover the common time range and discard the rest of the data. (assuming all have the same dt).
10-21-2014 04:39 PM
Thanks, but that's not the answer as the waveform (of whatever length) contains one cycle of physiological change. By trimming the ends of the longer ones only a part of the cycle is used; is not comparable, and information lost. The shortest cycle to date is about 250 datapoints, the longest 450. Ideally they need to be transformed so that they are all, for example, 500 datapoints long.
One possible way to overcome the problem may be to concatenate all the normalised data into one long dataset and then apply a median filter (or similar) to the whole lot. I think this would have the same effect of averaging the separate waveforms.
10-21-2014 04:56 PM
Can you show us some typical data?
Do the longer ones represent a slower change or were they acquired at a faster rate?
10-21-2014 06:45 PM
A slower change.
I have attached an XL spreadsheet where I have the data from two waveforms. Both 't' and ''y' are normalised. I have concatenated the two datasets, sorted them on on 't' and then performed a running average. It seems to work (in XL) so I need to figure out how to do it in Labview.