~logan/ubuntu/trusty/suitesparse/4.2.1-3ubuntu1

« back to all changes in this revision

Viewing changes to MATLAB_Tools/waitmex/waitmex.m

  • Committer: Bazaar Package Importer
  • Author(s): Rafael Laboissiere, Rafael Laboissiere, Ondrej Certik
  • Date: 2008-02-21 14:46:50 UTC
  • mfrom: (1.1.2 upstream) (5.1.1 hardy)
  • Revision ID: james.westby@ubuntu.com-20080221144650-tgeppgj0t7s759i8
Tags: 3.1.0-3
[ Rafael Laboissiere ]
* Upload to unstable

[ Ondrej Certik ]
* XS-DM-Upload-Allowed: yes field added
* Ondrej Certik added to uploaders

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function waitmex
 
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).
 
5
%
 
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
 
13
%
 
14
% Example:
 
15
%   waitmex
 
16
%
 
17
%
 
18
% See also waitex, waitexample, waitbar, pathtool.
 
19
 
 
20
% Copyright 2007, T. Davis
 
21
 
 
22
help waitmex
 
23
 
 
24
fprintf ('\ncompiling an example:\n') ;
 
25
fprintf ('mex waitexample.c waitmex.c\n') ;
 
26
mex waitexample.c waitmex.c
 
27
addpath (pwd) ;
 
28
 
 
29
fprintf ('\ntrying the example mexFunction:\n') ;
 
30
fprintf ('waitexample\n') ;
 
31
waitexample
 
32
 
 
33
fprintf ('\ntrying the m-file equivalent of waitexample:\n') ;
 
34
fprintf ('waitex\n') ;
 
35
waitex