This is a static copy of a profile reportHome
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 Name | Function Type | Calls |
legacy | M-function | 2 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
33 | tmr = timer('ExecutionMode','f... | 2 | 0.125 s | 50.0% |  |
42 | start(tmr) | 2 | 0.109 s | 43.7% |  |
24 | ax = newplot; | 2 | 0.016 s | 6.2% |  |
14 | if nargin < 4 | 2 | 0.000 s | 0.0% |  |
16 | end | 2 | 0.000 s | 0.0% |  |
Other lines & overhead | | | 0 s | 0% |  |
Totals | | | 0.250 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
timer.timer | M-function | 2 | 0.125 s | 50.0% |  |
timer.start | M-function | 2 | 0.109 s | 43.7% |  |
newplot | M-function | 2 | 0.016 s | 6.2% |  |
Self time (built-ins, overhead, etc.) | | | 0 s | 0% |  |
Totals | | | 0.250 s | 100% | |
M-Lint results
Coverage results
[ Show coverage for parent directory ]
Total lines in file | 44 |
Non-code lines (comments, blank lines) | 32 |
Code lines (lines that can run) | 12 |
Code lines that did run | 10 |
Code lines that did not run | 2 |
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.