2
%WAITMEX a small library for using a waitbar within a C mexFunction.
3
% This waitmex function compiles an example mexFunction, adds the current
4
% directory to your MATLAB path, and runs two examples (one in C, one in M).
6
% in C MATLAB M-file equivalent
7
% ---- ------------------------
8
% h = waitbar_create (x,msg) ; h = waitbar (x,msg)
9
% waitbar_update (x,h,NULL) ; waitbar (x,h)
10
% waitbar_update (x,h,msg) ; waitbar (x,h,msg)
11
% waitbar_destroy (h) ; close (h)
12
% waitbar_return (h) ; for returning h from a mexFunction
18
% See also waitex, waitexample, waitbar, pathtool.
20
% Copyright 2007, T. Davis
24
fprintf ('\ncompiling an example:\n') ;
25
fprintf ('mex waitexample.c waitmex.c\n') ;
26
mex waitexample.c waitmex.c
29
fprintf ('\ntrying the example mexFunction:\n') ;
30
fprintf ('waitexample\n') ;
33
fprintf ('\ntrying the m-file equivalent of waitexample:\n') ;
34
fprintf ('waitex\n') ;