This is a static copy of a profile reportHome
reshapeRegisters (72 calls, 0.262 sec)
Generated 05-Aug-2011 13:00:46 using cpu time.
function in file /home/LeechJ/cbass_analysis/reduc/reshapeRegisters.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
21 | d = reshape(permute(d,[3 1 2])... | 59 | 0.219 s | 83.3% |  |
13 | d.(nlist{k}) = reshapeRegister... | 71 | 0.022 s | 8.3% |  |
26 | return; | 72 | 0 s | 0% |  |
24 | end | 62 | 0 s | 0% |  |
22 | end | 59 | 0 s | 0% |  |
All other lines | | | 0.022 s | 8.3% |  |
Totals | | | 0.262 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
reshapeRegisters | function | 71 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0.262 s | 100.0% |  |
Totals | | | 0.262 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 26 |
Non-code lines (comments, blank lines) | 12 |
Code lines (lines that can run) | 14 |
Code lines that did run | 12 |
Code lines that did not run | 2 |
Coverage (did run/can run) | 85.71 % |
Function listing
time calls line
1 function d = reshapeRegisters(d)
2 % d = reshapeRegisters(d)
3 % This function reshapes all the registers in d, calling itself
4 % recursively.
5 %
6 % Oliver King, Jan 2010
7 % modified sjcm Nov to make sure it doesn't assume the 3rd dimension is time.
8
72 9 if isstruct(d)
10 % Call reshapeRegisters on each field
10 11 nlist = fieldnames(d);
10 12 for k=1:length(nlist)
0.02 71 13 d.(nlist{k}) = reshapeRegisters(d.(nlist{k}));
71 14 end
62 15 else
16 % Applies a standard reshape to the register.
62 17 if size(d,3) > 100 % don't like this fudge! Adds lines to my concise function :)
18 d = d(:,:,1:100);
19 end
62 20 if(size(d,3) ~= 3)
0.22 59 21 d = reshape(permute(d,[3 1 2]),size(d,3)*size(d,1),size(d,2),1);
59 22 end
23
62 24 end
25
72 26 return;