フィルターのクリア

How do you plot a differential equation?

1 回表示 (過去 30 日間)
Yianni
Yianni 2015 年 1 月 26 日
回答済み: Torsten 2015 年 1 月 26 日
I have the differential equation dy/dx = (x-5*y)*e^-x where y = 1 when x = 0. I need to plot this from x = 0 to x = 10. How do I do this? I started something but I am not sure if I am on the right track. See below:
syms y(x)
dsolve(diff(y) == (x-5*y)*exp(-x), y(0) == 1)

採用された回答

Torsten
Torsten 2015 年 1 月 26 日
ezplot(y,[0 10]);
Best wishes
Torsten.

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by