were gathered from a work that used MATLAB 2013a. The bug has been fixed in R2010b and later, see the official Bug Report. findpeaks ( 0 1 0) returns the (position of the) peak. findpeaks ( 0 1 1 0) which returns, while. (t_k-t_k_emp)/t_k = -0.0023889 0.012089 0. This function is the default implementation found in MATLAB. findpeaks(Aceleracion,Tiempo) Unlike plot() and many other functions, since findpeaks can be called without a corollary time/frequency vector, the data vector is the first argument, the time/frequency vector second. The behavior that you describe is a known bug in versions of MATLAB prior to R2010b. Peaks of the Radon transform - Estimation of lines parameters alphapeaks=alpha(palpha)*pi/180 ĭisplay the estimated parameters and the relative errors disp() ĭisp()
Palpha= % Horizontal coordinates of the peaks = radon(y,alpha) % to exact degrees of the lines t_kĭecomment to find the peaks (automaticaly) via function FastPeakFind % Find peaks of the Radon transform (automaticaly) % p=FastPeakFind(R) % we remove this false peak % p= % palpha=p(1:2:end) % pxp=p(2:2:end) įind peaks of the Radon transform (manually) pxp= % Vertical coordinates of the peaks Radon transform on the noisy data y alpha = -90+0.414:0.1:90 % +0.414 to avoid the samples to correspond P_k= % array containing offset of linesĭata_generation % Generate the blurred image xstar % of these K lines with additional % noise y=xstar+randn(H,W)*noiselevel RADON TRANSFORM OF XSTAR (NORMAL BLUR) T_k= % array containing angles of linesĪ_k= % array containing amplitude of lines
PlotComp=0 % display others comparaisons theo vs. There are several other options with findpeaks, but EKGs can vary.
Rng(0) % seed of random numbers generator Communications System Toolbox Version 5.4 (R2013a). Randomgen=0 % boolean if lines are generated randomly of manually DATA GENERATION W=65 % image width (must be odd W=2M+1)