用虚数单位绘制Matlab syms函数

问题描述

我在使用 ilaplace 函数时遇到绘图函数问题。 Ezplot 函数有点不工作,因为我的输出电压 [Ut] 有虚数单位。不知道怎么解决。

Ut =
 
exp(-7*t)*(- 64915267556669805/2251799813685248 - 10147698876818727i/281474976710656)
clc; clear; close all;

syms s;


tmax = 0.1; fp = 100000; dt = 1/fp; t=0:dt:tmax; N= length(t);
rad = pi;
degree = rad*180/pi             
w=12;                           % omega
Uwe = 10*sin(w*t + rad);        
R1 = 50;
L1 = 20;
R2 = 90;

XL = w*L1;                      % impedancja cewki

% Warunek początkowy - zamieniamy Uwe na U

U = 10*exp(i*degree)            
I = U / (R1+R2+XL)              
x = real(I);
y = imag(I);
magnitude=sqrt(x^2+y^2)
kat =-((atan(abs(y/x)))*180/pi);
rad2 = kat*pi/180 
r2p(I);

it = magnitude*sin(w*t+rad2)
IL0 = it(1,1)                    

Utest = L1*IL0;

Is = (U + Utest) / (R1+R2+L1*s) 

Us = Is * R2                    % output voltage

Ut = ilaplace(Us)

Ut = simplify(Ut,'Steps',10)

ezplot(Ut)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...