Error using ode45

1 回表示 (過去 30 日間)
Sam
Sam 2017 年 12 月 21 日
回答済み: James Tursa 2017 年 12 月 21 日
I have created the following function for my differential equation
function y=opdracht8(x)
y = 0.08x -2000
and i try to solve it with ode45 but matlab gives an error...
[y,t] = ode45(@opdracht8,[0 40], 0);
plot(y,t);
What do i do wrong?

採用された回答

James Tursa
James Tursa 2017 年 12 月 21 日
Incorrect number of arguments for the derivative function, and incorrect syntax within that function. E.g.,
function y=opdracht8(t,x)
y = 0.08*x -2000;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by