Is it possible to overwrite any of these variables:pi, eps, inf, i ? If so, how can it be undone?

 Respuesta aceptada

Matt Fig
Matt Fig el 12 de Oct. de 2012
Editada: Matt Fig el 12 de Oct. de 2012
Those are not variables, but functions.
which pi
which eps
You can mask any function with another function or a local variable. Of course this is a bad habit and many questions on this very site have arisen because people say, "MATLAB is broken, the MAX function doesn't work!" Here's what they did:
max = 0:5;
max(max) % Oops, this will not find the largest element anymore!
To undo the mask, simply clear the variable. If you have made a function in the local directory with the same name as a MATLAB function, you will have to delete it to undo the masking.

Más respuestas (0)

Categorías

Más información sobre Software Development Tools en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 12 de Oct. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by