MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manuel d'utilisateur Page 178

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 408
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 177
5 Calling Java from MATLAB
5-8
When you use the which function on methods defined by Java classes, the
function only acts on the classes currently loaded into the MATLAB working
environment. In contrast,
which always operates on MATLAB classes, whether
or not they are loaded.
Determining Which Classes Are Loaded
At any time during a MATLAB session, you can obtain a listing of all the Java
classes that are currently loaded. To do so, you use the
inmem function, in the
following form.
[M,X,J] = inmem
This function returns the list of Java classes in output argument J. (It also
returns in
M the names of all currently loaded M-files, and in X the names of all
currently loaded MEX-files.)
Here’s a sample of output from the
inmem function.
[m,x,j] = inmem
m =
'isequal'
'isunix'
'fullfile'
'filesep'
.
.
.
'matlabrc'
x =
'getprofl'
j =
'java.awt.Frame'
'com.mathworks.ide.desktop.MLDesktop'
Simplifying Java Class Names
Your MATLAB commands can refer to any Java class by its fully qualified
name, which includes its package name. For example, the following are fully
qualified names:
Vue de la page 177
1 2 ... 173 174 175 176 177 178 179 180 181 182 183 ... 407 408

Commentaires sur ces manuels

Pas de commentaire