property2.m

来自「用dsp解压mp3程序的算法」· M 代码 · 共 19 行

M
19
字号
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% property2.m - Program for showing Symmetry
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

x1 = [1  0.2 0.3 0.5 -0.3 0.2 -0.1 0.1];
X = fft(x1,8);
real_X = real(X);
imag_X = imag(X);
mag_X = abs(X);
phase_X = angle(X);


figure;
subplot(221), stem(0:7,real_X); title('Real part of X(k)');
subplot(222), stem(0:7,imag_X); title('Imag part of X(k)');
subplot(223), stem(0:7,mag_X); title('Mag of X(k)');
subplot(224), stem(0:7,phase_X); title('Phase of X(k)');

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?