%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%20022191 박영식 project #2%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
x=wavread('1.wav');
LengthFrame=200;
NoFrame=length(x)/200;
figure(1);
subplot(2,1,1); plot(x,'r');
set(gca,'color','n');
title('20022191_2 박영식 1)입력 전체 파형');
grid on;
for i=1:LengthFrame
X(i)=Frame(5,i); %%sampling///////
end
X200=abs(fftshift(fft(X,200))); %%fft.........
subplot(2,1,2); plot(X200,'r');
set(gca,'color','n');
title('20022191_2 박영식 2)한 프레임의 파형(5th)');
grid on;
for k=1:NoFrame
for i=1:LengthFrame
Frame(k,i)=x(i+LengthFrame*(k-1),1);
end
end
for i=1:LengthFrame
X(i)=Frame(5,i);
end
% Ploting the results
figure
stem(X120,'^','fill','k'); hold on;
plot(X120,'c'); hold off;
set(gca,'color','n');
title('20022191_2 박영식 3)magnitude of 1.wav(5th)','fontsize',12)
grid on
%%%%%20022191 박영식 project #2%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
x=wavread('1.wav');
LengthFrame=200;
NoFrame=length(x)/200;
figure(1);
subplot(2,1,1); plot(x,'r');
set(gca,'color','n');
title('20022191_2 박영식 1)입력 전체 파형');
grid on;
for i=1:LengthFrame
X(i)=Frame(5,i); %%sampling///////
end
X200=abs(fftshift(fft(X,200))); %%fft.........
subplot(2,1,2); plot(X200,'r');
set(gca,'color','n');
title('20022191_2 박영식 2)한 프레임의 파형(5th)');
grid on;
for k=1:NoFrame
for i=1:LengthFrame
Frame(k,i)=x(i+LengthFrame*(k-1),1);
end
end
for i=1:LengthFrame
X(i)=Frame(5,i);
end
% Ploting the results
figure
stem(X120,'^','fill','k'); hold on;
plot(X120,'c'); hold off;
set(gca,'color','n');
title('20022191_2 박영식 3)magnitude of 1.wav(5th)','fontsize',12)
grid on
댓글 달기