This is a static copy of a profile report

Home

Function details for con_klThis is a static copy of a profile report

Home

con_kl (Calls: 1, Time: 0.621 s)
Generated 19-Apr-2020 09:41:42 using performance time.
function in file /Users/sidhantkhanna/Documents/GitHub/BKS modified/code/Firms/con_kl.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
con_kl_testerscript1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
30
addpath(genpath('/Users/sidhan...
10.604 s97.4%
387
profile off;
10.004 s0.7%
317
f_con_concave_diff = fl_phi.*(...
60.002 s0.3%
35
fl_ahi,fl_zhi, fl_phi,fl_theta...
10.001 s0.2%
36
fl_kappa,it_agridno,it_zgridno...
10.001 s0.2%
All other lines  0.007 s1.2%
Totals  0.621 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
genpathfunction10.497 s80.1%
addpathfunction10.106 s17.1%
Self time (built-ins, overhead, etc.)  0.017 s2.7%
Totals  0.621 s100% 
Code Analyzer results
Line numberMessage
35Best practice is to separate output variables with commas.
35The value assigned here to 'fl_zhi' appears to be unused. Consider replacing it by ~.
54The value assigned to variable 'fl_kappa' might be unused.
102The variable 'ar_k_con' appears to change size on every loop iteration. Consider preallocating for speed.
102The variable 'ar_l_con' appears to change size on every loop iteration. Consider preallocating for speed.
143The value assigned here to 'val' appears to be unused. Consider replacing it by ~.
153The value assigned here to 'idx2' appears to be unused. Consider replacing it by ~.
234IF might not be aligned with its matching END (line 303).
Coverage results
Show coverage for parent directory
Total lines in function371
Non-code lines (comments, blank lines)160
Code lines (lines that can run)211
Code lines that did run50
Code lines that did not run161
Coverage (did run/can run)23.70 %
Function listing
time 
Calls 
 line
  21 
function [ar_k_con,ar_l_con]=con_kl(varargin)
  22 

  23 
close all;
  24 
bl_profile = true;      % Switch off profile if running a tester/calling from another function
  25 
if(bl_profile)
  26 
profile off;
  27 
profile on;
< 0.001 
      1 
  28
end 
  29 

  0.604 
      1 
  30
addpath(genpath('/Users/sidhantkhanna/Documents/GitHub/BKS modified/')); 
  31 

< 0.001 
      1 
  32
if ~isempty(varargin) 
  33 
    
  0.003 
      1 
  34
    [ar_a_v,ar_z_v,ar_a,ar_z ... 
      1 
  35
        fl_ahi,fl_zhi, fl_phi,fl_theta,fl_alpha,fl_w,fl_r,fl_delta,... 
      1 
  36
        fl_kappa,it_agridno,it_zgridno, ... 
      1 
  37
        ] = varargin{:}; 
  38 
   % Display matrix and graphs of constrained k and l (for every combination of a and z)
  39 
    
  40 
    % if testing the index below, print out graph, and also show each
  41 
    % iteration of the first order taylor approximation. if bl_state_test
  42 
    % is true, then test specific state iteration to arrive at \bar{k}.
< 0.001 
      1 
  43
    bl_print           = false; 
< 0.001 
      1 
  44
    bl_state_test      = false; 
< 0.001 
      1 
  45
    it_test_a_idx      = 1;         
< 0.001 
      1 
  46
    it_test_z_idx      = 4; 
< 0.001 
      1 
  47
    bl_saveimg         = false;  % True if images are to be saved, false if you want to publish them 
  48 
else
  49 
    
  50 
    fl_ahi             = 50;
  51 
    fl_zhi             = 7;
  52 
    it_agridno         = 5;
  53 
    it_zgridno         = 6;
  54 
    fl_kappa           = 0;
  55 
    ar_a               = linspace(0,fl_ahi,it_agridno);    % Sample asset grid
  56 
    ar_z               = linspace(0.2,fl_zhi,it_zgridno);  % Sample entrepreneurial productivity grid
  57 
    %ar_a              = 50;                               % for testing single a value  
  58 
    %ar_z              = 1;                                % for testing single z value 
  59 
    [a_m,z_m]          = meshgrid(ar_a,ar_z);              % Meshed matrix of assets and entrepreneurial productivity
  60 
                                                           % grid (size for a_m = it_zgridnoxit_agridno, z_m =it_zgridnoxit_agridno)
  61 
   
  62 
    ar_a_v             = a_m(:);                           % Meshed-vectorised asset grid
  63 
    ar_z_v             = z_m(:);                           % Meshed-vectorised entrepreneurial productivity grid
  64 
    it_k_n             = 20000;                            % capital grid points to create capital grid and search for 
  65 
                                                           % constrained k   
  66 
    fl_phi             = 0.5;
  67 
    
  68 
    [fl_alpha,fl_theta,fl_delta,fl_kappa] = ...
  69 
        deal(0.36, 0.79-0.36, 0.07, 0);
  70 
    [fl_r,fl_w,fl_ahi] = ...
  71 
        deal(0.04,3,100);
  72 
        
  73 
    %% Testing Controls
  74 
   
  75 
    bl_print           = true;                             % Print matrix of optimal k with graphs
  76 
    bl_state_test      = true;                             % Plotting taylor method graphs for root finding
  77 
    it_test_a_idx      = 2;                                % a index for drawing graph or root search of k using TS approx
  78 
    it_test_z_idx      = 4;                                % z index for drawing graph or root search of k using TS approx
  79 
    bl_saveimg         = true; 
< 0.001 
      1 
  80
end 
  81 

  82 
%% Parameter controls
< 0.001 
      1 
  83
it_max_iter_taylor     = 7;                 % No of iterations for taylor series approximation for constraint function 
  84 

  85 
%% Initialize Matrices
< 0.001 
      1 
  86
fl_R              = fl_r + fl_delta; 
< 0.001 
      1 
  87
mt_k_con          = ones(it_agridno,it_zgridno);    % Matrix for storing constrained k , for each combination on a and z 
< 0.001 
      1 
  88
mt_l_con          = ones(it_agridno,it_zgridno); 
  89 

< 0.001 
      1 
  90
fl_version    = 3; 
  91 
% version 1 = numerical method, version 2 = vectorised, version 3 = taylor
  92 
% series approximation for loop - has both vectorised and unvectorised
  93 
% versions
< 0.001 
      1 
  94
fl_vectorised = true; % for version 3- loop or vectorised 
  95 

  96 

  97 
%% Version 1 - Numerical Method
< 0.001 
      1 
  98
if(fl_version == 1) 
  99 
    for i = 1:it_agridno*it_zgridno
 100 
        fl_a    = ar_a_v(i);
 101 
        fl_z    = ar_z_v(i);
 102 
        [ar_k_con(i),ar_l_con(i)] = conkl_numerical(fl_a,fl_z,fl_r,fl_w,fl_alpha,fl_theta,fl_kappa,fl_delta,fl_phi,fl_R);
 103 
    end
 104 
    
 105 
    ar_k_con = ar_k_con';                 % transposing to get same order as input vector (it_agridnoxit_zgridno x 1)
 106 
    ar_l_con = ar_l_con';                 % transposing to get same order as input vector (it_agridnoxit_zgridno x 1)
 107 
    
 108 
    mt_k_con =reshape(ar_k_con, [it_zgridno,it_agridno]);
 109 
    mt_l_con =reshape(ar_l_con, [it_zgridno,it_agridno]);
 110 
    
 111 
    mt_k_con = mt_k_con';                   % getting to matrix of dimension it_agridnoxit_zgridno
 112 
    mt_l_con = mt_l_con';                   % getting to matrix of dimension it_agridnoxit_zgridno
 113 
    
 114 
    
 115 
%% Version 2 - Vectorised solution  
< 0.001 
      1 
 116
elseif (fl_version == 2) 
 117 
    
 118 
    ar_ks1 = linspace(0, 5*fl_ahi, it_k_n);  % Grid of capital to search for roots of constraint equation (order = 1 X it_k_n) 
 119 
    ar_ks  = fliplr(ar_ks1);                   % flipping array to pick up the second root (non-zero root)
 120 
    
 121 
    f_lmax = @(z,k) (fl_w./((k.^fl_alpha).*fl_theta.*z)).^(1/(fl_theta - 1)); % max l for a given constrained k
 122 
    
 123 
    f_con_concave = @(a,z,k) fl_phi.*((k.^fl_alpha).*z.*(f_lmax(z,k)).^fl_theta - fl_w.*(f_lmax(z,k)))-(1+fl_r)*fl_kappa.*ones(numel(a),it_k_n)+(1+fl_r).*(a).*ones(1,it_k_n); 
 124 
    % concave part of the constraint function
 125 
    
 126 
    f_con_straight = @(a,z,k) (1-fl_phi).*(1-fl_delta).*ones(numel(a),1).*k+fl_R.*ones(numel(a),1).*k;
 127 
    % straight line part of the constraint function
 128 
    
 129 
    f_con = @(a,z,k) f_con_concave(a,z,k) - f_con_straight(a,z,k); % constraint function
 130 
    
 131 
    f1 = f_con(ar_a_v, ar_z_v, ar_ks); 
 132 
    % f1 evaulates the constraint for each combination of a,z and k. Order of f1 = ((it_agridnoxit_zgridno) X it_k_n)
 133 

 134 
    
 135 
    % for i=1:it_agridno*it_zgridno
 136 
    %    f1(i,it_k_n)=-1000;
 137 
    % end
 138 
    
 139 
    f1(:,it_k_n)  = -1000;  % assigning a large absolute value to the constraint at k=0 so as to
 140 
                           % remove the root k=0
 141 
    
 142 
    
 143 
    [val, idx]    = min(abs((f1)'));  
 144 
   % for each combi of a,z, root of the constraint equation is the k for 
 145 
   % which the value of the constraint function is closest to zero. 
 146 
   % min function on a matrix minimizes over each column, min (NXM) is of
 147 
   % order (1XM). As f1 is of the order ((it_agridnoxit_zgridno) X it_k_n), 
 148 
   % dimension of val and idx = (1 X (it_agridnoXit_zgridno)). Since we need to minimize f1 over
 149 
   % k for each combination of a and z, and dim f1=((it_agridnoxit_zgridno) X it_k_n),
 150 
   % dim f1' = (it_k_n x (it_agridnoxit_zgridno)), dim min(abs((f1)'))= 1 X (it_agridnoxit_zgridno), 
 151 
   % dim val , idx = 1 X (it_agridnoxit_zgridno)                                                                   
 152 
   
 153 
   [val2,idx2]    = max(((f1)'));     % store the max value of f1(k) for each combination of a,z
 154 
    ar_k_con      = ar_ks(idx);    %  storing constrained k values, dim = 1 X (it_agridnoxit_zgridno)   
 155 
    
 156 
    % Analysing cases where the only root of constraint equation is k=0 in
 157 
    % the range of k's we are checking
 158 
    % There are 2 subcases:
 159 
    
 160 
    % 1) k = 0 is the only root and max of f is obtained at k = 0 ( all other
 161 
    % f's are negative in the range of k's )
 162 
    
 163 
    % 2) k = 0 is not the only root, but only root in the given range of k's
 164 
    % we are checking. The actual constrained k is very high in this case,
 165 
    % so assuming the optimal would surely be less than the constrained k
 166 
    
 167 
    for i=1:it_agridno*it_zgridno 
 168 
        if (ar_k_con(i)==ar_ks1(2))
 169 
            if (val2(i)<=0)
 170 
                ar_k_con(i)=0;  % Case 1)
 171 
            else
 172 
                ar_k_con(i)=1000000; % Case 2)
 173 
            end
 174 
        end
 175 
    end
 176 
    
 177 
    % Limitation of this method is for case 2), if optimal k was greater than
 178 
    % constrained k, those cases you are not sure about (not sure if those
 179 
    % cases exist)
 180 
    
 181 
    ar_k_con = ar_k_con'; % transposing to get same order as input vector (it_agridnoxit_zgridno x 1)
 182 
    
 183 
    ar_l_con = (fl_w./(fl_theta.*ar_z_v.*ar_k_con.^(fl_alpha))).^(1/(fl_theta-1));
 184 
    
 185 
    mt_k_con = reshape(ar_k_con, [it_zgridno,it_agridno]);
 186 
    mt_l_con = reshape(ar_l_con, [it_zgridno,it_agridno]);
 187 
    
 188 
    mt_k_con = mt_k_con';           % getting to matrix of dimension it_agridnoxit_zgridno
 189 
    mt_l_con = mt_l_con';            % getting to matrix of dimension it_agridnoxit_zgridno
 190 
    
 191 
%% Version 3 - Taylor Series Method - For loop
< 0.001 
      1 
 192
elseif (fl_version == 3) 
< 0.001 
      1 
 193
    if(~fl_vectorised) 
 194 
        
 195 
        % Solving constraint k for each combination of a and z one by one.
 196 
        % The constraint function has a linear part and a curved part.
 197 
        % Starting at any point, the the curved part is approximated to a straight line with a taylor series expansion
 198 
        % The intersection of the first approximation and the linear part
 199 
        % is the first guess of k. At the first guess of k, approximate the
 200 
        % curve part again as a stright line, then find its intersection
 201 
        % with a straight line for the next guess of k. Continue doing that
 202 
        % until it_max_iter_taylor iterations (you converge to the correct k in less than those no. of iterations 
 203 
        
 204 
        
 205 
        syms k w alph theta kappa r phi delta R
 206 
        for i = 1:it_agridno
 207 
            for j = 1:it_zgridno
 208 
                
 209 
                % Defining the functions using symbols only
 210 
                
 211 
                f_lmax             = (w/((k^alph)*theta*ar_z(j)))^(1/(theta - 1));  % optimal l to constrained k
 212 
                f_con_concave      = phi*((k^alph)*ar_z(j)*(f_lmax)^theta - w*(f_lmax))-(1+r)*kappa+(1+r)*(ar_a(i));
 213 
                % Concave part of constraint function of k
 214 
                f_con_straight     = (1-phi)*(1-delta)*k+R*k;
 215 
                % Straight line part of constraint function of k
 216 
                
 217 
                % Substituting parameters in the constraint function
 218 
                f_con_straight_sub = subs(f_con_straight,{w,alph,theta,kappa,r,phi,delta,R},{fl_w,fl_alpha fl_theta,fl_kappa,fl_r,fl_phi,fl_delta, fl_R});
 219 
                f_con_concavej_k   = subs(f_con_concave, {w,alph,theta,kappa,r,phi,delta,R}, {fl_w,fl_alpha fl_theta,fl_kappa,fl_r,fl_phi,fl_delta, fl_R});
 220 
                
 221 
                m  = 1;   % no if iteration for guess of k            
 222 
                kj = 1;   % First guess of k
 223 
                
 224 
                % * a = constant term in taylor approximate of the concave part of constraint function
 225 
                % * b = coefficient of k in taylor approximate of the concave part of constraint function
 226 
                % * c = 0 (constant term of straight line part of constraint - staight line function chosen that way)
 227 
                % * d = coefficient of k of straight line part of constraint 
 228 
                
 229 
                if (bl_state_test)
 230 
                    ar_k_store = zeros(1, it_max_iter_taylor);
 231 
                    % Store all values of guesses of k
 232 
                end
 233 
                
 234 
                if (fl_phi==0 && ar_a(i)==0) % assuming kappa = 0, id a = 0 and phi = 0, opti k = 0
 235 
                mt_k_con(i,j) = 0;
 236 
                mt_l_con(i,j) = 0;
 237 
                else
 238 
                
 239 
                while (m < it_max_iter_taylor)
 240 
                
 241 
                    f_con_concavej        = double(subs(f_con_concavej_k, {k}, {kj})); % substituting first guess of k
 242 
                    % computing coefficients a and b of taylor series approximate
 243 
                    f_con_concave_diff_k  = diff(f_con_concave,k);
 244 
                    f_con_concave_diff_kj = double(subs(f_con_concave_diff_k, {k,w,alph,theta,kappa,r,phi,delta,R}, {kj,fl_w,fl_alpha fl_theta,fl_kappa,fl_r,fl_phi,fl_delta, fl_R}));
 245 
            
 246 
                    d = (1-fl_phi)*(1-fl_delta)+ fl_R;
 247 
                    a = double(f_con_concavej-f_con_concave_diff_kj*kj); 
 248 
                    b = double(f_con_concave_diff_kj);
 249 
                    
 250 
                    if (b>d) % Case where both straight lines intersect at negative k (slope of tangent to curve greater 
 251 
                        % than that of straight line), first guess needs to a large no.
 252 
                        k_jplus1=kj*100;                      
 253 
                    else
 254 
                    k_jplus1= (a/(d-b)); % intersection of taylor approximate and straight line part of the constraint 
 255 
                    end
 256 
                    
 257 
              % Displaying coefficients of straight line and tangent to
 258 
              % curved part of the constraint, and each guess of k
 259 
              
 260 
                    if (i == it_test_a_idx && j == it_test_z_idx && bl_state_test)
 261 
                        st_test_iter_info_one = ['iter:', num2str(m), ', kj:', num2str(kj)];
 262 
                        st_test_iter_info_two = ['y-interp for lin approx of concave:', num2str(a)];
 263 
                        st_test_iter_info_thr = ['slope for lin approx of concave:', num2str(b)];
 264 
                        st_test_iter_info_fou = ['slope for origin linear line:', num2str(d)];
 265 
                        disp(st_test_iter_info_one);
 266 
                        disp(st_test_iter_info_two);
 267 
                        disp(st_test_iter_info_thr);    
 268 
                        disp(st_test_iter_info_fou);
 269 
                        ar_k_store(m) = kj; % storing all k's which were guessed until convergence to root
 270 
                    end  
 271 
                    
 272 
                    % updating
 273 
                    kj = k_jplus1; % next guess of k
 274 
                    m  = m+1; % updating iteration for next guess of k
 275 
                end
 276 
                mt_k_con(i,j) = kj; % updating constrained k for each a and z
 277 
                mt_l_con(i,j) = (fl_w/((kj^fl_alpha)*fl_theta*ar_z(j)))^(1/(fl_theta - 1));
 278 
                % updating optimal l to correponding constrained k for each a and z
 279 
                
 280 
                %% Graph Curve and line Intersection
 281 
                if (i== it_test_a_idx && j == it_test_z_idx && bl_state_test)
 282 
                    figure(1);
 283 
                    hold on;
 284 
                    %fl_k_max = min(0.001, kj + kj/10);
 285 
                    fl_k_max = 120;
 286 
                    fplot(f_con_concavej_k, [0, fl_k_max]);
 287 
                    fplot(f_con_straight_sub, [0, fl_k_max]);
 288 
                    
 289 
                    for it_m = 1:1:it_max_iter_taylor
 290 
                        fl_kj_cur = ar_k_store(it_m);
 291 
                        line([real(fl_kj_cur) real(fl_kj_cur)],[0 fl_kj_cur+1], 'LineStyle', '--'); 
 292 
                        % -- lines are guesses of k
 293 
                    end
 294 
                    
 295 
                    line([real(kj) real(kj)],[0 kj+1]);
 296 
                    % final solution k    
 297 
                    grid on;
 298 
                    grid minor;
 299 
                    if(bl_saveimg)
 300 
                    saveas(gcf, '/Users/sidhantkhanna/Documents/GitHub/BKS modified/code/Firms/figures/con_kl/taylor.png')
 301 
                    end
 302 
                end                
 303 
            end
 304 
            
 305 
            end
 306 
        end
 307 
        
 308 
%% Version 3 - Taylor Series Method - Vectorised Version 
 309 

< 0.001 
      1 
 310
    else 
 311 
       
< 0.001 
      1 
 312
        ar_kj = 3*ones(it_agridno*it_zgridno, 1); % initial guess of k 
< 0.001 
      1 
 313
        m     = 1; 
< 0.001 
      1 
 314
        while (m < it_max_iter_taylor) 
< 0.001 
      6 
 315
        f_lmax = (fl_w./((ar_kj.^fl_alpha)*fl_theta.*ar_z_v)).^(1/(fl_theta - 1)); 
< 0.001 
      6 
 316
        f_con_concave = fl_phi*((ar_kj.^fl_alpha).*ar_z_v.*(f_lmax).^fl_theta - fl_w.*(f_lmax))-(1+fl_r)*fl_kappa.*ones(it_agridno*it_zgridno,1)+(1+fl_r).*(ar_a_v); 
  0.002 
      6 
 317
        f_con_concave_diff = fl_phi.*(fl_alpha.*ar_kj.^(fl_alpha - 1).*ar_z_v.*((fl_w./(ar_kj.^fl_alpha.*fl_theta.*ar_z_v)).^(1/(fl_theta - 1))).^fl_theta - (fl_alpha.*ar_kj.^fl_alpha.*fl_w.*((fl_w./(ar_kj.^fl_alpha.*fl_theta.*ar_z_v)).^(1/(fl_theta - 1))).^(fl_theta - 1).*(fl_w./(ar_kj.^fl_alpha.*fl_theta.*ar_z_v)).^(1/(fl_theta - 1) - 1))./(ar_kj.^(fl_alpha + 1).*(fl_theta - 1)) + (fl_alpha.*fl_w^2.*(fl_w./(ar_kj.^fl_alpha.*fl_theta.*ar_z_v)).^(1/(fl_theta - 1) - 1))./(ar_kj.^(fl_alpha + 1).*fl_theta.*ar_z_v.*(fl_theta - 1))); 
< 0.001 
      6 
 318
        d = ((1-fl_phi)*(1-fl_delta)+ fl_R).*ones(it_agridno*it_zgridno, 1); 
< 0.001 
      6 
 319
        a = (f_con_concave-f_con_concave_diff.*ar_kj); 
< 0.001 
      6 
 320
        b = f_con_concave_diff; 
 321 
        
 322 
        % find k_{j+1} for everyone
< 0.001 
      6 
 323
        ar_k_jplus1 = (a./(d-b)); 
 324 
        % ar_k_jplus1_dup = ar_k_jplus1;
 325 
        
 326 
        % replace if lin approximate for slope is greater than linear slope
< 0.001 
      6 
 327
        ar_k_jplus1(b>d) = ar_kj(b>d)*10; 
 328 
                
< 0.001 
      6 
 329
        ar_kj = ar_k_jplus1; 
< 0.001 
      6 
 330
        m = m+1; 
< 0.001 
      6 
 331
        end 
 332 
        
< 0.001 
      1 
 333
        ar_k_con = ar_kj; 
 334 
    
< 0.001 
      1 
 335
    ar_l_con = (fl_w./(fl_theta.*ar_z_v.*ar_k_con.^(fl_alpha))).^(1/(fl_theta-1)); 
 336 
    
< 0.001 
      1 
 337
    if(fl_phi==0 && ar_a_v(1)==0) 
 338 
         ar_k_con(1:it_zgridno)=0;
 339 
         ar_l_con(1:it_zgridno)=0;
 340 
    end
 341 
    
< 0.001 
      1 
 342
    mt_k_con=reshape(ar_k_con, [it_zgridno,it_agridno]); 
< 0.001 
      1 
 343
    mt_l_con=reshape(ar_l_con, [it_zgridno,it_agridno]); 
 344 
    
< 0.001 
      1 
 345
    mt_k_con=mt_k_con'; 
< 0.001 
      1 
 346
    mt_l_con=mt_l_con'; 
 347 
    
 348 
                      
< 0.001 
      1 
 349
    end 
 350 
    
< 0.001 
      1 
 351
end 
 352 
    
 353 

 354 
%% Print matrix for constrained k and l
 355 

< 0.001 
      1 
 356
if(bl_print) 
 357 

 358 
    disp('mt_k_star_con');
 359 
    disp(mt_k_con);
 360 
    disp('mt_l_star_con');
 361 
    disp(mt_l_con);
 362 
    
 363 
figure (2)
 364 
surf(ar_z, ar_a, mt_k_con);
 365 
title('K constraint given a and z');
 366 
xlabel('a');
 367 
ylabel('z');
 368 
zlabel('K constraint');
 369 
view(125,35);
 370 
if(bl_saveimg)
 371 
saveas(gcf, '/Users/sidhantkhanna/Documents/GitHub/BKS modified/code/Firms/figures/con_kl/Kconst_az.png')
 372 
end
 373 

 374 
figure (3)
 375 
surf(ar_z, ar_a, mt_l_con);
 376 
title('L constraint given a and z');
 377 
xlabel('a');
 378 
ylabel('z');
 379 
zlabel('L with K constrained');
 380 
view(125,35);
 381 
if(bl_saveimg)
 382 
saveas(gcf, '/Users/sidhantkhanna/Documents/GitHub/BKS modified/code/Firms/figures/con_kl/Lconst_az.png')
 383 
end
 384 
end
 385 

< 0.001 
      1 
 386
if(bl_profile) 
  0.004 
      1 
 387
profile off; 
 388 
profile viewer;
 389 
st_file_name = '/Users/sidhantkhanna/Documents/GitHub/BKS modified/code/Profile/Firms/con_kl';
 390 
profsave(profile('info'), st_file_name);
 391 
end

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