solving differential equation and assigning value to symfun

3 ビュー (過去 30 日間)
swetha S
swetha S 2020 年 1 月 23 日
回答済み: Star Strider 2020 年 1 月 23 日
I solved my 1st order differntial equation using the below commands
syms y(t)
ode = diff(y) == t+2y;
cond = y(0) == 1;
ySol(t) = dsolve(ode,cond)
After this I have got my solution. Now my problem is I need to assign ySoln(t)=1 , to convert this equation to algebric one and solve for t.
I dont know how to assign a symfun to 1.

採用された回答

Star Strider
Star Strider 2020 年 1 月 23 日
Try this:
t_val = vpasolve(ySol==1,t) % Symbolic Solution

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEquation Solving についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by