User`s guide
Print Handlers
5-51
Initializing the Print Handler in Your Main M-File. Call the dummy print handler
initialization routine in the first executab le line of your main M-file . For
example, in
mr.m the call to initprnt immediately fo llows t h e function
declaration.
function mr(m)
initprnt; % Call print handler initialization routine
m=str2num(m);
r=mrank(m)
function initprnt
%#external
Building the Executable
You must compile myph.c with one of the supportedC compilers, and you must
ensure that the resulting object file is linked into the stand-alone application.
To build the C stand-alone executable, at the DOS/UNIX prompt type
mcc -t -L C -W main -T link:exe mr.m mrank.m myph.c
Testing the Executable
Run the executable by typing at the MATLAB prompt
mr 5
The outp ut d isp lays as
r =
1
2
3
3
5