Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Hi Guys! Please can someone help me plot JUST THE REAL (not imaginary) part of this two differential equations, here is my code? Thank you.

13 ビュー (過去 30 日間)
Jack Levy
Jack Levy 2017 年 11 月 15 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
syms I_1(t) I_2(t)
ode1 = diff(I_1) == ((12*exp(60*1i*t))-(10*I_1)-(0.9*I_2))/0.1;
ode2 = diff(I_2) == ((-0.9*I_1)-(10*I_2))/10;
odes = [ode1; ode2];
S = dsolve(odes);
I_1Sol(t) = S.I_1;
I_2Sol(t) = S.I_2;
[I_1Sol(t), I_2Sol(t)] = dsolve(odes);
cond1 = I_1(0) == 0;
cond2 = I_2(0) == 1;
conds = [cond1; cond2];
[I_1Sol(t), I_2Sol(t)] = dsolve(odes,conds);
fplot(I_1Sol)
hold on
fplot(I_2Sol)
grid on
legend('I_1Sol','I_2Sol','Location','best')

回答 (1 件)

Karan Gill
Karan Gill 2017 年 11 月 15 日
Use the real function.
fplot(real(I_1Sol))
Does this give the expected plot?
Karan.

この質問は閉じられています。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by