This is a static copy of a profile reportHome
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 Name | Function Type | Calls |
legacy | M-function | 1 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
10 | pause(2) | 1 | 0.094 s | 60.0% |  |
7 | figure('Units','Normalized','P... | 1 | 0.063 s | 40.0% |  |
6 | top_2ideas_g=[];top_2ideas_h=[... | 1 | 0.000 s | 0.0% |  |
12 | return | 1 | 0 s | 0% |  |
11 | close | 1 | 0 s | 0% |  |
Other lines & overhead | | | 0 s | 0% |  |
Totals | | | 0.156 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
axis | M-function | 1 | 0 s | 0% |  |
close | M-function | 1 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0.156 s | 100.0% |  |
Totals | | | 0.156 s | 100% | |
M-Lint results
Line number | Message |
24 | The value assigned here to variable 'omega' might never be used. |
27 | Logical indexing is usually faster than FIND. |
33 | Logical indexing is usually faster than FIND. |
39 | Logical indexing is usually faster than FIND. |
56 | Logical indexing is usually faster than FIND. |
57 | Logical indexing is usually faster than FIND. |
Coverage results
[ Show coverage for parent directory ]
Total lines in file | 57 |
Non-code lines (comments, blank lines) | 10 |
Code lines (lines that can run) | 47 |
Code lines that did run | 8 |
Code lines that did not run | 39 |
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));