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