
- •Version of matlab on different machines. It does not offer direct
- •In the workspace or file. You must use the functional form of who when
- •In a nested function, variables are grouped into those in the nested
- •If you run out of memory often, here are some additional system
- •If you do not specify filename, the load function searches for a file
- •If any data items require features that the specified version does not
- •Valid options for format are:
- •VirtualAddressSpace: [1x1 struct]
- •If the flag -inplace is used, the result is placed in the same
- •Inmem List functions in memory.
- •Variable names
- •Visible.
- •Is automatically run.
- •Is stored in a string.
- •Controlling the command window.
- •Vdspdebug/cd
- •Input parameters:
- •If the specified name cannot be found, an empty matrix is returned.
- •Idivide - Integer division with rounding option.
- •Interactive user input which cannot be provided.
- •Debugging.
- •If the matlabpath contains 'relative' directories then any file in those
- •Indicates who calls whom. Called_from is arranged so that
- •Information from the shrlib library file. Notfound is a cell array of
- •Invoked from the Swing Event Dispatch Thread.
Inmem List functions in memory.
M = INMEM returns a cell array of strings containing the names
of the M-files that are in the P-code buffer.
M = INMEM('-completenames') is similar, but each element of
the cell array has the directory, file name, and file extension.
[M,MEX]=INMEM also returns a cell array containing the names of
the MEX files that have been loaded.
[M,MEX,J]=INMEM also returns a cell array containing the names of
the Java classes that have been loaded.
Examples:
clear all % start with a clean slate
erf(.5)
m = inmem
lists the m-files that were required to run erf.
m1 = inmem('-completenames')
lists the same files, each with directory, name, and extension.
See also whos, who.
Reference page in Help browser
doc inmem
<namelengthmax> - Maximum length of MATLAB function or variable name.
NAMELENGTHMAX Maximum length of MATLAB function or variable name.
NAMELENGTHMAX returns the maximum length that a MATLAB
name can have. MATLAB names include:
Variable names
structure field names
function names
Simulink model names
See also genvarname.
Reference page in Help browser
doc namelengthmax
Managing the search path.
<path> - Get/set search path.
PATH Get/set search path.
PATH, by itself, prettyprints MATLAB's current search path. The initial
search path list is set by PATHDEF, and is perhaps individualized by
STARTUP.
P = PATH returns a string containing the path in P. PATH(P) changes the
path to P. PATH(PATH) refreshes MATLAB's view of the directories on
the path, ensuring that any changes to non-toolbox directories are
Visible.
PATH(P1,P2) changes the path to the concatenation of the two path
strings P1 and P2. Thus PATH(PATH,P) appends a new directory to the
current path and PATH(P,PATH) prepends a new directory. If P is already
on the path, then PATH(PATH,P) moves P to the end of the path,
and similarly, PATH(P,PATH) moves P to the beginning of the path.
For example, the following statements add another directory to MATLAB's
search path on various operating systems:
Unix: path(path,'/home/myfriend/goodstuff')
Windows: path(path,'c:\tools\goodstuff')
See also what, cd, dir, addpath, rmpath, genpath, pathtool, savepath, rehash.
Reference page in Help browser
doc path
<addpath> - Add directory to search path.
ADDPATH Add directory to search path.
ADDPATH DIRNAME prepends the specified directory to the current
matlabpath. Surround the DIRNAME in quotes if the name contains a
space. If DIRNAME is a set of multiple directories separated by path
separators, then each of the specified directories will be added.
ADDPATH DIR1 DIR2 DIR3 ... prepends all the specified directories to
the path.
ADDPATH ... -END appends the specified directories.
ADDPATH ... -BEGIN prepends the specified directories.
ADDPATH ... -FROZEN disables directory change detection for directories
being added and thereby conserves Windows change
notification resources (Windows only).
Use the functional form of ADDPATH, such as ADDPATH('dir1','dir2',...),
when the directory specification is stored in a string.
P = ADDPATH(...) returns the path prior to adding the specified paths.
Examples
addpath c:\matlab\work
addpath /home/user/matlab
addpath /home/user/matlab:/home/user/matlab/test:
addpath /home/user/matlab /home/user/matlab/test
See also rmpath, pathtool, path, savepath, userpath, genpath, rehash.
Reference page in Help browser
doc addpath
<rmpath> - Remove directory from search path.
RMPATH Remove directory from search path.
RMPATH DIRNAME removes the specified directory from the current
matlabpath. Surround the DIRNAME in quotes if the name contains a
space. If DIRNAME is a set of multiple directories separated by path
separators, then each of the specified directories will be removed.
RMPATH DIR1 DIR2 DIR3 removes all the specified directories from the
path.
Use the functional form of RMPATH, such as RMPATH('dir1','dir2',...),
when the directory specification is stored in a string.
P = RMPATH(...) returns the path prior to removing the specified paths.
Examples
rmpath c:\matlab\work
rmpath /home/user/matlab
rmpath /home/user/matlab:/home/user/matlab/test:
rmpath /home/user/matlab /home/user/matlab/test
See also addpath, pathtool, path, savepath, userpath, genpath, rehash.
Reference page in Help browser
doc rmpath
<rehash> - Refresh function and file system caches.
REHASH Refresh function and file system caches.
REHASH with no inputs performs the same refresh operations that are done
each time the MATLAB prompt is displayed--namely, for any non-toolbox
directories on the path, the list of known files is updated, the list of
known classes is revised, and the timestamps of loaded functions are
checked against the files on disk. The only time one should need to use
this form is when writing out files programmatically and expecting
MATLAB to find them before reaching the next MATLAB prompt.
REHASH PATH is the same as REHASH except that it unconditionally reloads
all non-toolbox directories. This is exactly the same as the behavior of
PATH(PATH). This form should be unnecessary unless you are running
MATLAB in an environment where it is unable to tell that a directory has
changed. When this situation arises, MATLAB displays a warning upon
startup.
REHASH TOOLBOX is the same as REHASH PATH except that it unconditionally
reloads all directories, including all toolbox directories. This
form should be unnecessary unless you are modifying files in toolbox
directories.
REHASH PATHRESET is the same as REHASH PATH except that it also
forces any shadowed functions to be replaced by any shadowing functions.
REHASH TOOLBOXRESET is the same as REHASH TOOLBOX except that it also
forces any shadowed functions to be replaced by any shadowing functions.
REHASH TOOLBOXCACHE will update the toolbox cache file on disk.
Type "help toolbox_path_cache" for additional info.
See also path, addpath, rmpath, savepath.
Overloaded methods:
csetinterface/rehash
Reference page in Help browser
doc rehash
<import> - Import packages into the current scope.
IMPORT Adds to the current packages and classes import list.
IMPORT PACKAGE_NAME.* adds the specified package name to the
current import list.
IMPORT PACKAGE1.* PACKAGE2.* ... adds multiple package names.
IMPORT CLASSNAME adds the fully qualified class name to the
import list.
IMPORT CLASSNAME1 CLASSNAME2 ... adds multiple fully qualified class
names.
IMPORT PACKAGE_NAME.FUNCTION adds the specified package-based function
to the current import list.
Use the functional form of IMPORT, such as IMPORT(S), when the
package or class name is stored in a string.
L = IMPORT(...) returns as a cell array of strings the contents
of the current import list as it exists when IMPORT completes.
L = IMPORT, with no inputs, returns the current import list
without adding to it.
IMPORT affects only the import list of the function within which
it is used. There is also a base import list that is used
at the command prompt. If IMPORT is used in a script, it will
affect the import list of the function which invoked the script,
or the base import list if the script is invoked from the
command prompt.
CLEAR IMPORT clears the base import list. The import lists of
functions may not be cleared.
Examples:
%Example 1: add the meta package of the MATLAB class system to
%the current import list
import meta.*
%Example 2: add java.awt package to the current import list
import java.awt.*
f = Frame; % Create java.awt.Frame object
%Example 3: import two java packages
import java.util.Enumeration java.lang.*
s = String('hello'); % Create java.lang.String object
methods Enumeration % List java.util.Enumeration methods
IMPORTING DATA
You can also import various types of data into MATLAB. This includes
importing from MAT-files, text files, binary files, and HDF files. To
import data from MAT-files, use the LOAD function. To use the
graphical user interface to MATLAB's import functions, type UIIMPORT.
For further information on importing data, see Import and Export Data
in the MATLAB Help Browser under the following headings:
MATLAB -> Programming Fundamentals
MATLAB -> External Interfaces -> Programming Interfaces
See also clear, load.
Overloaded methods:
cgprojconnections/import
cgcalinput/import
cgproject/import
cgddnode/import
cgdatasetnode/import
Reference page in Help browser
doc import
<finfo> - Identify file type against standard file handlers on path.
FINFO Identify file type against standard file handlers on path
[TYPE, OPENCMD, LOADCMD, DESCR] = finfo(FILENAME)
TYPE - contains type for FILENAME or 'unknown'.
OPENCMD - contains command to OPEN or EDIT the FILENAME or empty if
no handler is found or FILENAME is not readable.
LOADCMD - contains command to LOAD data from FILENAME or empty if
no handler is found or FILENAME is not readable.
DESCR - contains description of FILENAME or error message if
FILENAME is not readable.
See OPEN, LOAD
<genpath> - Generate recursive toolbox path.
GENPATH Generate recursive toolbox path.
P = GENPATH returns a new path string by adding all the subdirectories
of MATLABROOT/toolbox, including empty subdirectories.
P = GENPATH(D) returns a path string starting in D, plus, recursively,
all the subdirectories of D, including empty subdirectories.
NOTE 1: GENPATH will not exactly recreate the original MATLAB path.
NOTE 2: GENPATH only includes subdirectories allowed on the MATLAB
path.
See also path, addpath, rmpath, savepath.
Reference page in Help browser
doc genpath
<savepath> - Save the current MATLAB path in the pathdef.m file.
SAVEPATH Save the current MATLAB path in the pathdef.m file.
SAVEPATH saves the current MATLABPATH in the pathdef.m
which was read on startup.
SAVEPATH outputFile saves the current MATLABPATH in the
specified file.
SAVEPATH returns:
0 if the file was saved successfully
1 if the file could not be saved
See also pathdef, addpath, rmpath, userpath, path, pathtool.
Reference page in Help browser
doc savepath
Managing the java search path.
<javaaddpath> - Add directories to the dynamic java path.
JAVAADDPATH Add Java classes to MATLAB
JAVAADDPATH DIRJAR adds the specified directory or
jar file to the current dynamic Java path.
When loading Java classes, MATLAB always searches the
static Java path, defined in classpath.txt, before the
dynamic Java path. Enter 'javaclasspath' to see the
current static and dynamic Java path. Enter 'clear java'
to reload Java classes defined on the dynamic Java path.
Whenever the dynamic Java path is changed, 'clear java'