Recently Posted




Notice: SSI.php was unable to load a session! This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts! in /home/tutorial/public_html/mathforum/SSI.php on line 155

pack

pack Consolidate workspace memory.
performs memory garbage collection. Extended MATLAB sessions may cause memory to become fragmented, preventing
large variables from being stored. is a command that saves all variables on disk, clears the memory, and then
reloads the variables.

If you run out of memory often, here are some additional system
specific tips:
Windows: Increase virtual memory using the control panel.
Unix: Ask your system manager to increase your Swap Space.

You should cd to a directory where you have “write” permission to execute this command successfully. The following lines of code will help you accomplish the consolidation of workspace memory.

View CodeMATLAB
1
2
3
4
cwd = pwd;
cd(tempdir);

cd(cwd)

See also memory.

Tags: ,

open

OPEN files by extension.
NAME where NAME must contain a string, does different things
depending on the type of the object named by that string:

Type Action
—- ——
variable named array in Array Editor
.mat file MAT file; store variables in a structure in the workspace
.fig file figure in Handle Graphics
.m file M-file in M-file Editor
.mdl file model in SIMULINK
.p file the matching M-file if there is one
.html file HTML document in Help Browser

works similar to LOAD in the way it searches for files.

If NAME exists on MATLAB path, file returned by WHICH.

If NAME exists on file system, file named NAME.

Examples:

(’handel’) error if handel.mdl, handel.m, and handel
are not on the path.

(’handel.mat’) error if handle.mat is not on path.

(’d:\temp\data.mat’) error if data.mat is not in d:\temp.

is user-extensible. To a file with the extension “.XXX”,
calls the helper function OPENXXX, that is, a function
named ‘’, with the file extension appended.

For example,
(’foo.m’) calls openm(’foo.m’)
foo.m calls openm(’foo.m’)
myfigure.fig calls openfig(’myfigure.fig’)

You can create your own OPENXXX functions to change the way standard
file types are handled, or to set up handlers for new file types.
will call whatever OPENXXX function it finds on the path.

Special cases:
for workspace variables, calls OPENVAR
for image files, calls OPENIM

If there is no matching helper function found, calls OPENOTHER.

See also saveas, which, load, uiopen, uiload, path.

Overloaded methods
help scribehandle/.m
help serial/.m

Tags: ,

more

   Control paged output in command window.
more OFF disables paging of the output in the MATLAB command window.
ON enables paging of the output in the MATLAB command window.
(N) specifies the size of the page to be N lines.

When is enabled and output is being paged, advance to the next
line of output by hitting the RETURN key;  get the next page of
output by hitting the spacebar. Press the “q” key to exit out
of displaying the current item.

Tags: ,