impedance.m

来自「时间域有限差分法(TD-FDM)源代码」· M 代码 · 共 29 行

M
29
字号
% prob1-2
% plot real & imaginary part of characteristic impedance and alpha/beta
% versus omega for [0,16pi] rad/s
R=0;    L=1;    G=0.1;  C=1;
w = 0:0.4*pi:16*pi;
gamma = size(1:max(size(w)));
for i=1:max(size(w))
    gamma(i) = sqrt((R+j*w(i)*L)*(G+j*w(i)*C));
    Z(i) = sqrt((R+j*w(i))/(G+j*w(i)*C));
end
%Z = sqrt((R+j*w)/(G+j*w*C));
alpha = real(gamma);
beta = imag(gamma);

figure;
%subplot(1,2,1);
plot(w,real(Z),'-','LineWidth',2);
grid on;
xlabel('\omega(rad/s)');
axis([-3 63 -0.1 1.1]);
title('real part of characteristic impedance');

figure;
%subplot(1,2,2); 
plot(w,imag(Z),'-','LineWidth',2);
grid on;
axis([-3 60 -0.005 0.045]);
xlabel('\omega(rad/s)');
title('imaginary part of characteristic impedance');

⌨️ 快捷键说明

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