I have some data labelled x_v[n] and I am trying to locate the starting and ending points of the peaks from my data.
Till now I obtained x_v[n] and then I performed template matching.
I require to find the starting and ending points of the peaks on x_v[n] Any idea as to how I can do that please?
Here is my code till now:
fs = 256; N = length(EOG_Data); T = 1/fs; Time = [0:(N - 1)] * T; figure();plot(Time, EOG_Data);title('x_v[n]');[pks, locs] = findpeaks(R, 'MinPeakHeight',10e6); %finding peaks
figure();plot(Time, R); hold on;plot(EOG_Time(locs), pks, '*r') hold off;
Best Answer