Error using ode45
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Sam
am 21 Dez. 2017
Beantwortet: James Tursa
am 21 Dez. 2017
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?
0 Kommentare
Akzeptierte Antwort
James Tursa
am 21 Dez. 2017
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!