Prev: ??? Error using ==> reshape
Next: `Fn Home' & `Fn End', etc., will write characters in MATLAB (-nodesktop)
From: nethaji anandhavalli on 18 Apr 2010 10:28 sir, "y" is my original signal: y= load ('C:\Program Files\MATLAB71\work\ecg2.txt'); %load the original signal i just clear with the following functionl: WidthPoints=length(y)/40; AmpThreshold=min(y)+0.05*(max(y)-min(y)); smoothwidth=round(WidthPoints/2); % SmoothWidth should be roughly equal to 1/2 the peak width (in points) smoothwidth=round(smoothwidth); d=fastsmooth(deriv(y),smoothwidth); can u explain what the thing going on below, how it proceeds? pls pls pls. mainly the bolded function can get cleared. pls help me sir. pls AmpTest=AmpThreshold; for j=smoothwidth:length(y)-smoothwidth, if sign(d(j)) > sign (d(j+1)), % Detects zero-crossing if d(j)-d(j+1) > SlopeThreshold*y(j), % if slope of derivative is larger than SlopeThreshold if y(j) > AmpTest, % if height of peak is larger than AmpThreshold for k=1:FitWidth, % Create sub-group of points near peak groupindex=j+k-n+1; if groupindex<1, groupindex=1;end if groupindex>vectorlength, groupindex=vectorlength;end xx(k)=y(groupindex);yy(k)=t(groupindex); end [coef,S,MU]=polyfit(xx,log(abs(yy)),2); % Fit parabola to log10 of sub-group with centering and scaling c1=coef(3);c2=coef(2);c3=coef(1); PeakX=-((MU(2).*c2/(2*c3))-MU(1)); % Compute peak position and height of fitted parabola PeakY=exp(c1-c3*(c2/(2*c3))^2); MeasuredWidth=norm(MU(2).*2.35703/(sqrt(2)*sqrt(-1*c3))); after fitting up of polynomial cure, then we going for remaining procedure? pls pls help me out sir> -- with regards, Nethaji anandhavalli . D
From: ImageAnalyst on 18 Apr 2010 14:48
Nethaji anandhavalli . D Help you with what? You haven't said what you want the "remaining procedure" to do. Plus you haven't given us any sample data to work with. What kind of answers are you realistically expecting? And next time, post with a meaningful subject line. "pls (sic) help me" is not helpful, not like "Need help doing (whatever it is you want to do) with my ecg signal)" would be. -ImageAnalyst |