求助 MATLAB
Givenx(n)=[1,2,3,4],PleasecalculatetheDFToutputofthissequencewithMatlab,Pleaseplotmag...
Given x(n)=[1,2,3,4],
Please calculate the DFT output of this sequence with Matlab,
Please plot magnitude, real part, imaginary part and phase angle of above DFT output. 展开
Please calculate the DFT output of this sequence with Matlab,
Please plot magnitude, real part, imaginary part and phase angle of above DFT output. 展开
2007-11-11
展开全部
close all;
%Given x(n)=[1,2,3,4],
x=[1,2,3,4],
figure;bar(x);
%Please calculate the DFT output of this sequence with Matlab,
X=fft(x);
%Please plot magnitude,
X_mag=abs(X);
figure;bar(X_mag);
%real part,
X_real=real(X);
figure;bar(X_real);
%imaginary part
X_imag=imag(X);
figure;bar(X_imag);
%phase angle
X_phase=angle(X);
figure;bar(X_phase);
%Given x(n)=[1,2,3,4],
x=[1,2,3,4],
figure;bar(x);
%Please calculate the DFT output of this sequence with Matlab,
X=fft(x);
%Please plot magnitude,
X_mag=abs(X);
figure;bar(X_mag);
%real part,
X_real=real(X);
figure;bar(X_real);
%imaginary part
X_imag=imag(X);
figure;bar(X_imag);
%phase angle
X_phase=angle(X);
figure;bar(X_phase);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询