Hi All,
I am trying to figure out how to cut out the specific segment of the signal where I draw the border using findpeaks function.
I am using example of findpeaks link below:
x = linspace(0,1,1000);Pos = [1 2 3 5 7 8]/10;Hgt = [4 4 2 2 2 3];Wdt = [3 8 4 3 4 6]/100;for n = 1:length(Pos) Gauss(n,:) = Hgt(n)*exp(-((x - Pos(n))/Wdt(n)).^2);endPeakSig = sum(Gauss);plot(x,Gauss,'--',x,PeakSig)grid
Then, using findpeaks function,
findpeaks(PeakSig,x,'Annotate','extents','WidthReference','halfheight')title('Signal Peak Widths')
I want to cut the segment of the border into 3 segment.
The method I am thinking is find the X value corresponding the Y value, which is not an effective way to do it.
Best Answer