?? matrix_operation.m
字號:
clear;%a fast way to generate a matrix by multiplying a column vector by a row%vectorX = 1:5;M = X'*X;M%generate a complex signalt = 0:1e-3:10;z = exp(-2*i*pi*t);%x and y are the real and imaginary part of zx =real(z);y = imag(z);figure(2);plot(t, x);hold on; grid on;plot(t, y, 'r');legend('real part', 'imaginary part');%rho and theta are the magnitude and phase of zrho = abs(z);theta = angle(z);figure(3);plot(t, rho);hold on; grid on;plot(t, theta, 'r');legend('magnitude', 'phase');%z_conj is the conjugate of zz_conj = conj(z);figure(4);plot(t, z+z_conj-2*x);hold on; grid on;plot(t, z-z_conj-2*i*y,'r');legend('difference in (z+z_conj-2real)', 'difference in (z-z_conj-2j imag)');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -