Dave,
What is the level of noise in the signal?
And do your pulses vary much in peak amplitude?
Do you need to do anything with your data other than count the pulses (i.e. find their position)?
The most basic approach (forgive me if you've already done this)
% Vector a contains your data
threshold = 5; % (or whatever)
b = a>threshold;
And then write a short bit of code to record where values in b are the same as their adjacent values. Where b(index) == 0 and b(index+1) == 1, index represents the position of the start of a pulse. Then simply count how many times that happens. Of course this isn't totally robust to noise close to the threshold.
If you have more problems than this, you could try a convolution approach to cleaning up the signal. Define an artificial series of data points that contains a typical pulse shape. Take an FFT of it, and of your original data.
Multiply the two outcomes of the FFTs (convolution) then do an inverse FFT of the output. What you get should be a dataset with things that 'look' like your pulses accuentuated, and other features (noise) suppressed.
Shout if you have questions about convolution, FFTs etc. You could do a similar thing using wavelet decomposition.
Best,
Tom Clark
"Dave " <dplescia@yahoo.com> wrote in message <ge50u6$8gv$1@fred.mathworks.com>...
> I have data sets that have been recorded from an oscilloscope. Each data set contains approximately 150000 points that represent a number of pulses; let's say 30 pulses for example. The pulses are clearly visible on the scope and when the data is plotted with Matlab. However, due to noise in the lines and 8bit resolution of the scope, there is some noise in the pulses. I have been able to clean up the waveform a little bit using downsampling and LOWESS smoothing, but there may still be more than one local maximum in a given pulse. I am trying to figure out a method of counting the number of pulses in a given waveform. A typical pulse will consist of 5000 points, and has a amplitude range of about 0 to 10. Are there any builtin tools that would allow me to do this in Matlab? Has anyone accomplished this with custom functions?
>
> Thanks!
