This is a static copy of a profile report

Home

ffy_rouwenhorst_mkv_recursive (Calls: 1, Time: 0.010 s)
Generated 16-Jul-2020 17:08:32 using performance time.
function in file /Users/sidhantkhanna/Documents/GitHub/BKS modified/ProfFanCode/external/stats/ffy_rouwenhorst_mkv_recursive.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
ffy_rouwenhorstfunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
10
zv = zeros(1,i)';
60.005 s46.5%
11
m = p*[[m zv];[zv' 0]] + (1-p)...
60.004 s42.5%
15
end
60.001 s5.5%
9
for i = 1:h-1
10.000 s1.4%
13
m(1,:) = 2*m(1,:);
60.000 s0.0%
All other lines  0.000 s4.0%
Totals  0.010 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function18
Non-code lines (comments, blank lines)5
Code lines (lines that can run)13
Code lines that did run12
Code lines that did not run1
Coverage (did run/can run)92.31 %
Function listing
time 
Calls 
 line
   1 
function [m] = ffy_rouwenhorst_mkv_recursive(p,q,h)
   2 
%%
   3 
% Rouwenhorst(1995)
   4 

< 0.001 
      1 
   5
if h == 1 
   6 
    m = 1;
< 0.001 
      1 
   7
else 
< 0.001 
      1 
   8
    m = 1; 
< 0.001 
      1 
   9
    for i = 1:h-1 
  0.005 
      6 
  10
        zv = zeros(1,i)'; 
  0.004 
      6 
  11
        m = p*[[m zv];[zv' 0]] + (1-p)*[[zv m];[0 zv']] + (1-q)*[[zv' 0];[m zv]] + q*[[0 zv'];[zv m]]; 
< 0.001 
      6 
  12
        m = m/2; 
< 0.001 
      6 
  13
        m(1,:) = 2*m(1,:); 
< 0.001 
      6 
  14
        m(length(m),:) = 2*m(length(m),:); 
< 0.001 
      6 
  15
    end 
< 0.001 
      1 
  16
end 
  17 

< 0.001 
      1 
  18
end 

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