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

1 visualización (últimos 30 días)
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.

Respuestas (1)

Walter Roberson
Walter Roberson el 22 de Oct. de 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

Categorías

Más información sobre Numerical Integration and Differential Equations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by