Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

inmem

Names of functions, MEX-files, classes in memory

Syntax

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

Description

M = inmem returns a cell array of strings containing the names of the functions 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,C] = inmem also returns a cell array C containing the names of the classes that are currently loaded.

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

Examples

collapse all

List the functions that remain in memory after calling the magic function.

clear all        
magic(10);

M = inmem
M = 
    'workspacefunc'
    'magic'

The function list includes magic and additional functions that are in memory in your current session.

Call a sample MEX-function named arrayProduct, and then verify that the MEX-function is in memory. You must have a supported C compiler installed on your system to run this example.

clear all
sampleFolder = fullfile(matlabroot,'extern','examples','mex');
addpath(sampleFolder)
mex arrayProduct.c

s = 5; 
A = [1.5, 2, 9];
B = arrayProduct(s,A);

[M,X] = inmem('-completenames');
X
X = 
    'matlabroot\extern\examples\mex\arrayProduct.mexw64'

More About

collapse all

Tips

If inmem is called with any argument other than '-completenames', it behaves as if it were called with no argument.

See Also

Introduced before R2006a

Was this topic helpful?