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 CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by