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

 Accepted Answer

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.

More Answers (0)

Categories

Find more on Software Development Tools in Help Center and File Exchange

Asked:

on 12 Oct 2012

Community Treasure Hunt

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

Start Hunting!