This is a static copy of a profile report

Home

get_top_2ideas (1 call, 0.156 sec)
Generated 15-Mar-2007 12:02:07 using real time.
M-function in file c:\mind07\get_top_2ideas.m
[Copy to new window for comparing multiple runs]

Parents (calling functions)

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

Line NumberCodeCallsTotal Time% TimeTime Plot
10
pause(2)
10.094 s60.0%
7
figure('Units','Normalized','P...
10.063 s40.0%
6
top_2ideas_g=[];top_2ideas_h=[...
10.000 s0.0%
12
return
10 s0%
11
close
10 s0%
Other lines & overhead  0 s0%
Totals  0.156 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
axisM-function10 s0%
closeM-function10 s0%
Self time (built-ins, overhead, etc.)  0.156 s100.0%
Totals  0.156 s100% 
M-Lint results
Line numberMessage
24The value assigned here to variable 'omega' might never be used.
27Logical indexing is usually faster than FIND.
33Logical indexing is usually faster than FIND.
39Logical indexing is usually faster than FIND.
56Logical indexing is usually faster than FIND.
57Logical indexing is usually faster than FIND.
Coverage results
[ Show coverage for parent directory ]
Total lines in file57
Non-code lines (comments, blank lines)10
Code lines (lines that can run)47
Code lines that did run8
Code lines that did not run39
Coverage (did run/can run)17.02 %
Function listing
   time   calls  line
1 function [top_2ideas_g,top_2ideas_h]=get_top_2ideas(content,connector)
2 %computes only second level ideas; this MIND is intellectually challenged and
3 %cannot think about abstractions of level greater than two
4 %produces only complete ideas
1 5 if isempty(connector)
< 0.01 1 6 top_2ideas_g=[];top_2ideas_h=[];
0.06 1 7 figure('Units','Normalized','Position',[0 0 1 1])
1 8 axis off
1 9 text(.2,.5,'No top-2ideas','FontSize',32)
0.09 1 10 pause(2)
1 11 close
1 12 return
13 end
14 load('c:\mind_data06')
15 tops_i=find(ismember(content(:,2),L2));%in i-coordinates
16 tops_g=content(tops_i,2);
17 %above in g-coordinates
18 tops_h=content(tops_i,1);
19 % above is in h-coordinates
20 n_tops=length(tops_i); top_2ideas_g=cell(1,n_tops);top_2ideas_h=cell(1,n_tops);
21 for k=1:n_tops
22 top_2ideas_g{1,k,1}=tops_g(k);
23 top_2ideas_h{1,k,1}=tops_h(k);
24 top_g=tops_g(k);top_h=tops_h(k);mod=G(top_g).modality;omega=mod_omegas(mod);
25 f=find((connector(:,1)==top_h)&(connector(:,3)==1));
26 if ~isempty(f)
27 f1=connector(f,2);i=find(content(:,1)==f1);f=content(i,2);
28 top_2ideas_g{1,k,:}=[top_2ideas_g{1,k,:},f];
29 top_2ideas_h{1,k,:}=[top_2ideas_h{1,k,:},f1];
30 end
31 f=find((connector(:,1)==top_h)&(connector(:,3)==2));
32 if ~isempty(f)
33 f1=connector(f,2);i=find(content(:,1)==f1);f=content(i,2);
34 top_2ideas_g{1,k,:}=[top_2ideas_g{1,k,:},f];
35 top_2ideas_h{1,k,:}=[top_2ideas_h{1,k,:},f1];
36 end
37 f=find((connector(:,1)==top_h)&(connector(:,3)==3));
38 if ~isempty(f)
39 f1=connector(f,2);i=find(content(:,1)==f1);f=content(i,2);
40 top_2ideas_g{1,k,:}=[top_2ideas_g{1,k,:},f];
41 top_2ideas_h{1,k,:}=[top_2ideas_h{1,k,:},f1];
42 end
43 end
44
45 %find complete ideas
46 complete=zeros(1,n_tops);
47 for k=1:n_tops
48 v=top_2ideas_g{1,k,:};
49 top=v(1);mod=g_mod(top);omega=mod_omegas(mod);
50 if (length(v)==1+omega)
51 complete(k)=1;
52 end
53 end
54
55 %now keep only complete ideas
56 top_2ideas_g=top_2ideas_g(find(complete));
57 top_2ideas_h=top_2ideas_h(find(complete));