MATLAB: Constantly receiving an error undefined function or variable z

errorMATLABundefinedunexpectedvariableworkspace

No matter what I type into MATLAB, I receive an error:
Undefined function or variable z
This error initially occurred after I tried to define:
>> z=2
(z did not appear in my workspace)
Now it occurs even when I try things that do not include a 'z':
>> 2*2
>> x=2
>> restoredefaultcache
>> rehash toolboxcache

Best Answer

Restart MATLAB to clear any association with the function or variable 'z'.