MuPAD Differential equation solver
2 ビュー (過去 30 日間)
古いコメントを表示
I tried following the directions from:
on pg 8-12, but for some reason i'm getting an error with my syntax. I think it doesnt like how i'm writing apostrophe when i write y'(x).
Someone give me some ideas on how to make it work?
Thank you!
4 件のコメント
採用された回答
bym
2011 年 4 月 8 日
Try using dsolve from the matlab command window. y'(x) would be 'Dy' as in
dsolve('Dy = x',<initial conditions>,'x')
Edit
so for the example it should be:
syms x y;
dsolve('Dy-y^2','x')
- untested -
その他の回答 (1 件)
Billy
2011 年 5 月 5 日
2 things:
- Be very careful to enter y(x) (never just plain y).
- In the MuPad statement you included with your comment, you need a colon:
diffequation = ode(y'(x)-y(x)^2,y(x))
Should be:
diffequation := ode(y'(x)-y(x)^2,y(x))
instead
You can then
solve( diffequation )
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!