Code covered by the BSD License
-
P=ipeak(DataMatrix,PeakD,AmpT...
Version 3.91, FitW now equals number of points, not number of intervals;
-
AmpTSlider(n,h)
Changes AmpThreshold when the AmpThreshold slider is moved.
-
BGSlider(n,h)
Called when the BG slider is clicked.
-
FitSlider(n,h)
Changes FitWidth when the FitWidth slider is moved.
-
P=findpeaks(x,y,SlopeThreshol...
function P=findpeaks(x,y,SlopeThreshold,AmpThreshold,smoothwidth,peakgroup)
-
P=findpeaks(x,y,SlopeThreshol...
function P=findpeaks(x,y,SlopeThreshold,AmpThreshold,smoothwidth,peakgroup,smoothtype)
-
P=findpeakslidersRedraw(x,y,S...
Redraws graph for FindPeakSliders when slider are moved.
-
PeakSlider(n,h)
Changes PeakNumber when the Peak slider is moved.
-
SlopeTSlider(n,h)
Changes SlopeThreshold when the SlopeThreshold slider is moved.
-
SmoothSlider(n,h)
Changes SmoothWidth when the SmoothWidth slider is moved.
-
V=findvalleys(x,y,SlopeThresh...
function P=findvalleys(x,y,SlopeThreshold,AmpThreshold,smoothwidth,peakgroup,smoothtype)
-
[index,closestval]=val2ind(x,...
Returns the index and the value of the element of vector x that is closest to val
-
d=deriv(a)
First derivative of vector using 2-point central difference.
-
d=secderiv(a)
Second derivative of vector using 3-point central difference.
-
exp(-((x-pos)./(0.6006.*wid))...
-
lorentzian(x,position,width)
-
rtslid(fig,f,hh,varargin)
RTSLID Slider widget that responds to dragging realtime
-
smoothwidth. Works well with ...
-
sy=condense(y,n)
Condense y by a factor of n, where n is a non-zero positive integer.
-
Demo4peaks.m
-
DemoFindPeak.m
-
DemoFindPeak.m
-
DemoFindPeakSliders.m
-
DemoFindPeakSliders2.m
-
DemoFindPeakSlidersG.m
-
FindPeakSliders.m
-
FindPeakSlidersG.m
-
RedrawPeak.m
-
TestPeakfind.m
-
ipeakdemo.m
-
ipeakdemo1.m
-
ipeakdemo2.m
-
ipeakdemo3.m
-
ipeakdemo4.m
-
View all files
from
Peak finding and measurement
by Tom O'Haver
Function to locate and measure the positive peaks and valleys in noisy data sets.
|
| sy=condense(y,n)
|
function sy=condense(y,n)
% Condense y by a factor of n, where n is a non-zero positive integer.
% Produces a shorter, approximate version of vector y, with each group
% of n adjacent points in y replaced by its average. Use for reducing the
% length and processing time of over-sampled signals or for preliminary
% and exploratory analysis of very large signals to locate the interesting
% bits, which can then be selected out of the full-length signal for
% more precise analysis. For x,y data sets, use this function on both
% independent variable x AND dependent variable y so that the features
% of y will appear at the same x values.
% Example: condense([1 2 3 4 5 6 7 8 9 10 11 12],3) yields [2 5 8 11]
% condense([.9 1.1 .9 1 .9 1.1 .9 1 .9 1.1 .9 1],3) = [0.9667 1 0.9333 1]
% condense([0 0 0 0 0 0 0 1 1 1 1 1 1 1],2) = [0 0 0 .5 1 1 1]
n=round(n);
m=floor(length(y)/n);
if n > 1
sy=mean(reshape(y(1:n*m),n,m));
else
sy=y;
end
|
|
Contact us at files@mathworks.com