
- •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.
Invoked from the Swing Event Dispatch Thread.
Example
% Crate a JFrame and have all subsequent methods invoke on the EDT.
f = javaObjectEDT('javax.swing.JFrame', 'New Title')
f.getTitle
Caveats
When a Java array of arrays is indexed with only one subscript,
the value returned is an array in the top level array of arrays,
not a scalar element of the linearized form of the array of
arrays.
See also perl, mex, javaObjectEDT, javaMethodEDT
Overloaded methods:
sgmltag/java
<usejava> - True if the specified Java feature is supported in MATLAB.
USEJAVA True if the specified Java feature is supported in MATLAB.
USEJAVA(LEVEL) returns 1 if the feature is supported and
0 otherwise.
The following levels of support exist:
LEVEL MEANING
-----------------------------------------------------
'jvm' The Java Virtual Machine is running.
'awt' AWT components are available.
'swing' Swing components are available.
'desktop' The MATLAB interactive desktop is running.
"AWT components" refers to Java's GUI components in the Abstract
Window Toolkit. "Swing components" refers to Java's lightweight
GUI components in the Java Foundation Classes.
EXAMPLES:
If you want to write an m-file that displays a Java Frame and want
to be robust to the case when there is no display set or no JVM
available, you can do the following:
if usejava('awt')
myFrame = java.awt.Frame;
else
disp('Unable to open a Java Frame.');
end
If you want to write an m-file that uses Java code and want it to
fail gracefully when run in a MATLAB session that does not have access
to a JVM, you can add the following check:
if ~usejava('jvm')
error([mfilename ' requires Java to run.']);
end
See also javachk
Reference page in Help browser
doc usejava