This is a static copy of a profile report

Home

blinktxt (2 calls, 0.250 sec)
Generated 15-Mar-2007 12:01:48 using real time.
M-function in file c:\mind07\blinktxt.m
[Copy to new window for comparing multiple runs]

Parents (calling functions)

Function NameFunction TypeCalls
legacyM-function2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
33
tmr = timer('ExecutionMode','f...
20.125 s50.0%
42
start(tmr)
20.109 s43.7%
24
ax = newplot;
20.016 s6.2%
14
if nargin < 4
20.000 s0.0%
16
end
20.000 s0.0%
Other lines & overhead  0 s0%
Totals  0.250 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
timer.timerM-function20.125 s50.0%
timer.startM-function20.109 s43.7%
newplotM-function20.016 s6.2%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0.250 s100% 
M-Lint results
Line numberMessage
Coverage results
[ Show coverage for parent directory ]
Total lines in file44
Non-code lines (comments, blank lines)32
Code lines (lines that can run)12
Code lines that did run10
Code lines that did not run2
Coverage (did run/can run)83.33 %
Function listing
   time   calls  line
1 function blinktxt(x,y,str,prd)
2 %BLINKTXT - create a blinking text object
3 % BLINKTXT(X,Y,STR) creates a blinking text object at the position (X,Y) in
4 % the current axes, using the string STR. The default period is 0.5
5 % seconds.
6 % BLINKTXT(X,Y,STR,PRD) uses the period PRD to control the blinking of the
7 % text object.
8
9
10 % make sure there's an input
2 11 error(nargchk(3,4,nargin))
12
13 % if less than 4 inputs, set default value for 'prd'
< 0.01 2 14 if nargin < 4
< 0.01 2 15 prd = .5;
< 0.01 2 16 end
17
18 % make sure 'str' is a string or cell array of strings
2 19 if ~ischar(str) && ~iscellstr(str)
20 error('Input must be a string or a cell array of strings.')
21 end
22
23 % prepare axes
0.02 2 24 ax = newplot;
25
26 % create text object
2 27 txt = text(x,y,str,'Parent',ax,'Color','r','FontSize',20);
28
29 % store the string in the text object's UserData
2 30 set(txt,'UserData',str);
31
32 % create timer object
0.13 2 33 tmr = timer('ExecutionMode','fixedRate',...
34 'Name','BlinkingTextTimer',...
35 'Period',prd,...
36 'TimerFcn',{@blinkcallback,txt});
37
38
39
40
41 % start the timer
0.11 2 42 start(tmr)
43
44

Other subfunctions in this file are not included in this listing.