Skip to content

Commit

Permalink
Plot spectrum using original spectrogram function
Browse files Browse the repository at this point in the history
  • Loading branch information
Yan Michalevsky committed Feb 26, 2014
1 parent 54a174a commit d86333e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plot_spectrums.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ function plot_spectrums(to_plot, fs, flt)

for k = 1:3
figure;
% specgram(samples(:, k), 128, 120);
spectrogram(samples(:, k), hanning(NFFT), round(NFFT * 0.9), NFFT, fs);
spectrogram(samples(:, k), NFFT, round(NFFT*0.9), NFFT);
% Using AuditoryToolbox spectrogram
% spec = spectrogram(samples(:, k), NFFT, 2, 2);
% x = (0 : size(spec, 2) - 1) / fs;
% y = 0 : size(spec, 1) - 1;
% imagesc(x, y, spec);
% xlabel('Time [sec]');
% ylabel('Freq [Hz]');
end;
end

0 comments on commit d86333e

Please sign in to comment.