how to use for loop to get a value of y at different time?

2 ビュー (過去 30 日間)
SAHIL SAHOO
SAHIL SAHOO 2022 年 7 月 19 日
コメント済み: SAHIL SAHOO 2022 年 7 月 19 日
syms y(t)
k = 0.01; % critical coupling strength
L = 0.5;
sigma = 0.1;
tc = 70E-9;
eqn = diff(y,t) == (- ((sigma^2)*k/tc)*sin(y - pi/2) + L*(sigma^2)/(2*tc)*sin(y + pi/2)/sqrt(1 + cos(y + pi/2)))
cond = y(0) == 0;
ySol(t) = dsolve(eqn,cond)
%where and how I should put for loop so I can get the different Y at different t? how to plot Y vs t in this ?

採用された回答

Torsten
Torsten 2022 年 7 月 19 日
The requirement that you can evaluate Y for different values of t is that you get a solution for Y from your code. I don't get a solution.
Use ODE45 to solve your equation numerically.
  1 件のコメント
SAHIL SAHOO
SAHIL SAHOO 2022 年 7 月 19 日
yes, I tried in ode 45 and I get that, thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by