Error: Unrecognized function or variable 'FunExample2'. / Error in Newton Root (line 15)

1 Ansicht (letzte 30 Tage)
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.

Antworten (1)

Walter Roberson
Walter Roberson am 22 Okt. 2020
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

Kategorien

Mehr zu Numerical Integration and Differential Equations finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by