Error: Unrecognized function or variable 'FunExample2'. / Error in Newton Root (line 15)
2 ビュー (過去 30 日間)
古いコメントを表示


I am not very familiar with MATLAB, but use it as a tool in my Numerical Methods class. I have taken a C class before so I do have a general idea of how to debug, but I really have no idea with this one.
0 件のコメント
回答 (1 件)
Walter Roberson
2020 年 10 月 22 日
You have stored FunExample2 and FunDerExample2 inside the same file NewtonRoot.m .
There are valid reasons to do something like that, but a side effect of doing that is that it is difficult to get a handle to any function other than the first one from outside of the function file, such as at the command line.
You should put FunExample2 into FunExample2.m and FunDerExample2 into FunDerExample2.m
参考
カテゴリ
Help Center および File Exchange で Numerical Integration and Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!