MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
Function or Variable Renamed Example
Variable name on the left side of
assignment statement

Rename y in:

y = 1

As you rename such a function or variable, a tooltip opens if there is more than one
reference to that variable or function in the file. The tooltip indicates that MATLAB will
rename all instances of the function or variable in the file when you press Shift + Enter.


Typically, multiple references to a function appear when you use nested functions or local
functions.


NoteMATLAB does not prompt you when you change:



  • The name of a global variable.

  • The function input and output arguments, varargin and varargout.


To undo automatic name changes, click once.


Find and Replace Text in Files
Free download pdf