Why am I getting an error on this?
1 回表示 (過去 30 日間)
古いコメントを表示
Why am I getting an error that says "Not enough input arguments."
function dydx = funct(x, y, z)
a = 1;
b = 2;
c = 3;
dydx = a*y + b*z + c*x;
end
y0 = 1;
z0 = 2;
[x, y] = ode45(@funct, [0, 10], [y0, z0]);
plot(x, y);
2 件のコメント
Bora Eryilmaz
2022 年 12 月 14 日
func() takes 3 scalar arguments (x, y, z), but you are passing a single vector argument ([y0, z0], etc.) to it.
回答 (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!