I don't know how to fix this, and I honestly don't know what caused this with chebfun
1 回表示 (過去 30 日間)
古いコメントを表示
採用された回答
Stephen23
2024 年 2 月 13 日
編集済み: Stephen23
2024 年 2 月 13 日
"...I honestly don't know what caused this with chebfun"
You modified the function (perhaps accidentally) by adding some code outside of the function definition. By doing so you turn the Mfile into a script (which of course cannot be called like a function with input arguments).
"I don't know how to fix this..."
Remove any code that you added outside of the function definition. Users sometime do this accidentally at the very start of a function help when opening in the editor or when copy-pasting a function from somwhere, e.g.:
ooops % <- this turns the Mfile into a script!
% My wonderful function cannot be called :(
function myfun(inp)
..
end
If you are unable to find and remove your extra code then just download that function again.
2 件のコメント
Stephen23
2024 年 2 月 13 日
"You also suggeseted re-downloading the function and I was wondering how to do that."
Go to the place where you got that function from ... and get a new copy. For example, from here:
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!