matlab的反拉式变换问题
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/19 01:08:25
matlab的反拉式变换问题
求电路的冲激响应,已经反拉式变换了,想要画图表现出来,但是总是提示出错
Undefined function or variable 't'.
Error in ==> chongjixiangying at 11
plot(t,I2t,'b')
我看不明白是怎么回事,提示是说t有问题,难道反变换之后不能直接使用吗?是不是I2t里面没有变量的原因?
clear
clc
clf
syms s
U1s=(1+2*s)/(2*s^3+5*s^2+5*s+3);
I2s=U1s/(1+2*s);
U0s=U1s*2*s/(1+2*s);
I2t=ilaplace(I2s)
U0t=ilaplace(U0s)
t=0:0.01:16;
subplot(2,1,1)
plot(t,I2t,'b')
title('冲击电流');
xlabel('t(s)');
ylabel('I(A)');
subplot(2,1,2)
plot(t,U0t,'r')
title('冲击电压');
xlabel('t(s)');
ylabel('U(V)');
求电路的冲激响应,已经反拉式变换了,想要画图表现出来,但是总是提示出错
Undefined function or variable 't'.
Error in ==> chongjixiangying at 11
plot(t,I2t,'b')
我看不明白是怎么回事,提示是说t有问题,难道反变换之后不能直接使用吗?是不是I2t里面没有变量的原因?
clear
clc
clf
syms s
U1s=(1+2*s)/(2*s^3+5*s^2+5*s+3);
I2s=U1s/(1+2*s);
U0s=U1s*2*s/(1+2*s);
I2t=ilaplace(I2s)
U0t=ilaplace(U0s)
t=0:0.01:16;
subplot(2,1,1)
plot(t,I2t,'b')
title('冲击电流');
xlabel('t(s)');
ylabel('I(A)');
subplot(2,1,2)
plot(t,U0t,'r')
title('冲击电压');
xlabel('t(s)');
ylabel('U(V)');
这次好了.用subs
clear
clc
clf
syms s
U1s=(1+2*s)/(2*s^3+5*s^2+5*s+3);
I2s=U1s/(1+2*s);
U0s=U1s*2*s/(1+2*s);
I2t=ilaplace(I2s)
U0t=ilaplace(U0s)
t=0:0.1:16;
I2t=subs(I2t)
U0t=subs(U0t)
subplot(2,1,1)
plot(t,I2t,'b')
title('冲击电流');
xlabel('t(s)');
ylabel('I(A)');
subplot(2,1,2)
plot(t,U0t,'r')
title('冲击电压');
xlabel('t(s)');
ylabel('U(V)');
clear
clc
clf
syms s
U1s=(1+2*s)/(2*s^3+5*s^2+5*s+3);
I2s=U1s/(1+2*s);
U0s=U1s*2*s/(1+2*s);
I2t=ilaplace(I2s)
U0t=ilaplace(U0s)
t=0:0.1:16;
I2t=subs(I2t)
U0t=subs(U0t)
subplot(2,1,1)
plot(t,I2t,'b')
title('冲击电流');
xlabel('t(s)');
ylabel('I(A)');
subplot(2,1,2)
plot(t,U0t,'r')
title('冲击电压');
xlabel('t(s)');
ylabel('U(V)');