This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Share data between functions or workspaces, generate valid variable names


isvarnameDetermine if input is valid variable name
matlab.lang.makeUniqueStringsConstruct unique strings from input strings
matlab.lang.makeValidNameConstruct valid MATLAB identifiers from input strings
namelengthmaxMaximum identifier length
persistentDefine persistent variable
assigninAssign value to variable in specified workspace
globalDeclare variables as global
mlockPrevent clearing function from memory
munlockAllow clearing functions from memory
mislockedDetermine if function is locked in memory


Variable Names

Create valid variable names and avoid potential naming conflicts.

Base and Function Workspaces

The base workspace stores variables that you create at the command line or that a script creates when you run it from the command line or Editor. To protect the integrity of the data, every function has its own workspace that is separate from the base workspace and all other workspaces.

Check Variable Scope in Editor

Use MATLAB® function and variable highlighting features to identify when and where your code uses a particular function or variable.

Was this topic helpful?