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.

Use Help Files with MEX Files

You can document the behavior of your MEX files by writing a MATLAB® script containing comment lines. The help command searches for a MATLAB script and displays the appropriate text.

For example, copy the following text from the arrayProduct.c MEX source file into a file, arrayproduct.m.

% arrayproduct.m Help file for arrayProduct MEX-file.
%  arrayProduct.c - example in MATLAB External Interfaces
%  Multiplies an input scalar (multiplier) 
%  times a 1xN matrix (inMatrix)
%  and outputs a 1xN matrix (outMatrix)
%  The calling syntax is:
% 		outMatrix = arrayProduct(multiplier, inMatrix)

%  This is a MEX-file for MATLAB.
%  Copyright 2007-2014 The MathWorks, Inc.

When you type:

help arrayproduct

MATLAB displays the comments.

See Also

Related Topics

Was this topic helpful?