Revision as of 19:50, 13 October 2009 by Dlamba (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
clc;
close all;
clear all;

[y,Fs,bits] = auread('bird_chirping2.au');

x = y(:,1);

clear y;
N = length(x);

time = [1:N].*(1/Fs);

han = plot(time,x);
xlab = xlabel('Seconds');
ylab = ylabel('Amplitude');
grid on;
set(han,'LineWidth', 2);
set([xlab, ylab],'FontSize', 24, 'FontName', 'Times');
set(gca,'FontSize',20,'FontName','Times','Fontweight','Bold')

wavwrite(x,Fs,bits,'test.wav');


[X,f] = centeredFFT(x,Fs);


figure;
han1 = plot(f,abs(X));
axis([-8000,8000,0,max(abs(X))]);
grid on;
xlab1=xlabel('Frequency(Hz)');
ylab1=ylabel('|X[k]|');
set(han1,'LineWidth', 2);
set([xlab1, ylab1],'FontSize', 24, 'FontName', 'Times');
set(gca,'FontSize',20,'FontName','Times','Fontweight','Bold')

sound(x,Fs,bits);

Alumni Liaison

Ph.D. 2007, working on developing cool imaging technologies for digital cameras, camera phones, and video surveillance cameras.

Buyue Zhang