How to Solve with subs
2 ビュー (過去 30 日間)
古いコメントを表示
I am trying to first solve for Tau first, and then plug the known value back in and solve for y(t) @ 1.5 seconds.
it is given that @ y(1.2)=80.
clear;clc;
syms T %Tau
syms yt
t=1.2;
y0=0;
KA=100; %steady response
U_t=(y0-KA)*exp(-t/T); %transient response
y_t=80; %given that y(t), if y(1.2)=80
eq3_5a=y_t==KA+U_t
Tau=vpasolve(eq3_5a,T)
subs(U_t,T,Tau)
eq3_5b=yt==KA+U_t
solve(eq3_5b,yt)
0 件のコメント
採用された回答
VBBV
2022 年 2 月 18 日
clear;clc;
syms T yt
t=1.2;
y0=0;
KA=100; %steady response
U_t=(y0-KA)*exp(-t/T) %transient response
y_t=80; %given that y(t), if y(1.2)=80
eq3_5a=y_t==KA+U_t
Tau=vpasolve(eq3_5a,T)
subs(U_t,T,Tau)
eq3_5b=yt==KA+U_t
Yt = solve(eq3_5b,yt)
vpa(subs(Yt,T,1.5),4)
5 件のコメント
VBBV
2022 年 2 月 18 日
編集済み: VBBV
2022 年 2 月 18 日
clear;clc;
syms T yt t
% t=1.2;
y0=0;
KA=100; %steady response
U_t= (y0-KA)*exp(-t/T) %transient response
y_t=80; %given that y(t), if y(1.2)=80
eq3_5a=y_t==KA+U_t;
Tau=vpasolve(subs(eq3_5a,t,1.2),T)
subs(U_t,T,Tau);
eq3_5b=yt==KA+U_t
Yt = solve(eq3_5b,yt);
vpa(subs(Yt,[T t],[Tau 1.5]),4)
Ok, It is possible to Subs 2 variables like above
その他の回答 (0 件)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!