inmem

Names of M-files, MEX-files, Sun™ Java™ classes in memory

Syntax

M = inmem
[M, X] = inmem
[M, X, J] = inmem
[...] = inmem('-completenames')

Description

M = inmem returns a cell array of strings containing the names of the M-files that are currently loaded.

[M, X] = inmem returns an additional cell array X containing the names of the MEX-files that are currently loaded.

[M, X, J] = inmem also returns a cell array J containing the names of the Java classes that are currently loaded.

[...] = inmem('-completenames') returns not only the names of the currently loaded M- and MEX-files, but the path and filename extension for each as well. No additional information is returned for loaded Java classes.

Examples

Example 1

This example lists the M-files that are required to run erf.

clear all;        % Clear the workspace
erf(0.5);

M = inmem
M = 
   'erf'

Example 2

Generate a plot, and then find the M- and MEX-files that had been loaded to perform this operation:

clear all
surf(peaks)

[m x] = inmem('-completenames');

m(1:5)
ans = 
    'F:\matlab\toolbox\matlab\ops\ismember.m'
    'F:\matlab\toolbox\matlab\datatypes\@opaque\double.m'
    'F:\matlab\toolbox\matlab\datatypes\isfield.m'
    'F:\matlab\toolbox\matlab\graphics\gcf.m'
    'F:\matlab\toolbox\matlab\elmat\meshgrid.m'

x(1:end)
ans = 
    'F:\matlab\toolbox\matlab\graph2d\private\lineseriesmex.dll'

See Also

clear

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS