hi, i just made this program that gives me a plot with something like a sinc function. i need to find the difference between the index of the two peaks (not the one peak in the middle)
, manualy i can do this by subtracting the indexes but i want to make a program that will take plots different then this and do the same thing the peaks are the values from matrix R
eventually i till make a for loop and change the number 2 (as shown in the code) and do the same calculation for the rest of the matrix
[pks,locs] = findpeaks(R(:,2))
as you can see from the attached figure that the function changed
Best Answer