📄 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 + -