Ode45 too many input arguments
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!