Ode45 too many input arguments

조회 수: 15 (최근 30일)
Marcus Stürup
Marcus Stürup 2020년 4월 1일
댓글: James Tursa 2020년 4월 1일
clc; clear all; close all;
y0=1;
tSpan=[0 10];
[t,y]=ode45(@(t,y) mas(t,y), tSpan, y0);
plot(t,y)
function dt = mas(t,y)
dt=-2*y-t;
end
Hey can anyone please help, i tried using ode45 for a simple function, but i always get the error message:
Error using ode45
Too many input arguments.
Error in programstart (line 8)
[t,y]=ode45(@(t,y) mas(t,y), tSpan, y0);
Why is this?
thanks in advance
  댓글 수: 4
Marcus Stürup
Marcus Stürup 2020년 4월 1일
Im using matlab 2020a. The whole code is in one scribt.
James Tursa
James Tursa 2020년 4월 1일
What does this show
which ode45

댓글을 달려면 로그인하십시오.

답변 (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