Peak to Peak distance

I have an m file like this
clear;
figure;
grid on;
hold on;
Fs = 11000; % sampling rate in Hz
dt = 5; % duration in seconds
y = wavrecord(dt*Fs, Fs, 'double');
ly = length(y);
time = (1/Fs)*ly;
%y1 = fft(y);
t = linspace(0,time,length(y));
%axis([0 5 500 500]);
%freqz(Y);
plot(t,y);
I want to determine sharp peaks as in fft but fft didn't give what i want. And also i want to determine the distance between peaks. How can i do it ? Please help me.

1 Comment

What difference did you observe between the fft and the information you were looking for?
Are you looking for peak frequencies, or are you looking for peak amplitudes (loudest points) ?

Sign in to comment.

Answers (0)

Tags

Asked:

on 2 Jan 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!