I'm having this kind of error in the below code g Error using ceil Too many input arguments. Error in g (line 6) CG = ceil(G,1);
1 回表示 (過去 30 日間)
古いコメントを表示
function [CG] = g(G)
G = 57.5;
if 5-mod(G,5)<=2 then
CG = G + 5-mod(G,5);
else
CG = ceil(G,1);
end
error message
g
Error using ceil
Too many input arguments.
Error in g (line 6)
CG = ceil(G,1);
0 件のコメント
回答 (1 件)
Jon
2022 年 5 月 6 日
Unless the first argument to the ceil function is a duration (time) then ceil only takes one argument. So in your call it doesn't know what to do with your second argument (1). What were you intending that second argument to do?
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Mathematics and Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!