5. From Optimal Consumption to Aiyagari Model#

DING Minjie, Spring 2025


In this tutorial, we will go over a basic optimal consumption problem, then extend it to Aiyagari model.

  1. A Basic Optimal Consumption Model using Endogenous Grid Method

  2. Extend to Stationary Equilibrium: Solve Aiyagari Model


1. A Basic Optimal Consumption Model using Endogenous Grid Method#


cd"C:\Users\ading\A_TA_Notes"
pwd
ans = 'C:\Users\ading\A_TA_Notes'
clear all;  % Clears all variables from the workspace
close all;  % Closes all open figure windows
clc;        % Clears the Command Window

Parameters#

%% Code Cell 1: Basic Parameters

% Households
gamma   = 2;        % risk aversion in consumption utility function 
r = 0.04;           % The rate at which savings grow
beta = 0.95;        % How much future utility is worth today

% Household income: discretize a normal distribution N(mu,sigma^2)
y_mu    = 1;       % mean of distribution
y_sd    = 0.2;     % standard deviation of income distribution
y_grid_size      = 5;       % number of grid

width = fzero(@(x)discrete_normal(y_grid_size, y_mu, y_sd, x),2);
[temp, y_grid, y_distribution] = discrete_normal(y_grid_size, y_mu, y_sd, width);
y_cum_distribution = cumsum(y_distribution);   % cumulative distribution

% Asset gridss
a_grid_size          = 500;
a_max        = 50; 
borrow_limit  = 0;
a_grid_power   = 0.5; %1 for linear, 0 for L-shaped

a_grid = linspace(0,1,a_grid_size)';
a_grid = a_grid.^(1./a_grid_power);
a_grid = borrow_limit + (a_max - borrow_limit).*a_grid;

% Iteration seeting
iteration_max    = 1000;   % maxium iteration
iteration_counter = 0;        % iteration counting 

iteration_tolerance    = 1.0e-6; % Tolerance for convergence 
iteration_diff = 100;           % initial difference 

% Simulation setting
simulation_n_size        = 50000;    % number of simulation individuals
simulation_t_size        = 1000;     % number of simulaton periods

%mpc options
mpc_amount1  = 1.0e-10; %approximate thoeretical mpc
mpc_amount2  = 0.10; % one percent of average income: approx $500

Let’s check grid for income.

y_grid
y_distribution
y_grid = 5×1 double
    0.6133
    0.8066
    1.0000
    1.1934
    1.3867
y_distribution = 5×1 double
    0.0735
    0.2409
    0.3712
    0.2409
    0.0735

As we do in last tutorial, we set local function to facilitate expression

%% Code Cell 2: Local function to facilitate expression

% Utility function
if gamma == 1
    u = @(c)log(c);
else    
    u = @(c)(c.^(1-gamma)-1)./(1-gamma);
end    

% Derivative of utility function to consumption
u1 = @(c) c.^(-gamma);               

% When we have u1, how to get consumption.
u1_inverse = @(u) u.^(-1./gamma);
%% Code Cell 3: Initialize value functions and consumption function

C_current = zeros(a_grid_size, y_grid_size);      % current consumption
C_endo    = zeros(a_grid_size, y_grid_size);      % endogenous consumption from Euler equation
C_next    = zeros(a_grid_size, y_grid_size);      % next consumption from interpolation/budget constraint 
A_endo    = zeros(a_grid_size, y_grid_size);      % endogenous asset from budget constraint
A_next    = zeros(a_grid_size, y_grid_size);      % next asset from interpolation/budget constraint

[A_matrix Y_matrix]=ndgrid(a_grid, y_grid);
C_guess   = r * A_matrix + Y_matrix;              % initial guess of consupmtion
% Equivalent to: 
% C_guess = zeros(a_grid_size,y_grid_size);
% for i_y = 1:y_grid_size
%     C_guess(:,i_y) = r.*a_grid+y_grid(i_y);
% end

You may wonder where is “A_current”. A_current is fixed, which is exactly A_matrix.

Iteration#

Then, we iterate using endogenous grid method.

%% Code Cell 4: Iteration with Endogenous Grid Points 

C_current = C_guess;

while iteration_counter <= iteration_max && iteration_diff > iteration_tolerance

    iteration_counter = iteration_counter + 1;
  
    emuc = u1(C_current)*y_distribution;         
    % expected marginal utility of consumption
    muc1 = beta.*(1+r).*emuc;                    
    % new marginal utility from Euler equation
    C_endo = u1_inverse(muc1);                   
    % endogenous consumption from marginal utility   

    for i_y = 1:y_grid_size         
    % loop over different y
        A_endo(:,i_y) = (C_endo + A_matrix(:,i_y) - Y_matrix(:,i_y))./(1+r);  
        % endogenous asset from budget constraint 

        A_next(:,i_y) = interp1(A_endo(:,i_y), A_matrix(:,i_y), A_matrix(:,i_y));
        % next asset from interpolation 
    end
    
    A_next = max(A_next, borrow_limit)          
    % borrowing constraint    
    C_next = (1 + r) .* A_matrix + Y_matrix - A_next;       
    % next consumption from budget constraint

    iteration_diff = max(max(abs(C_current - C_next)));
    % update new difference
    C_current = C_next; 
    % update current consumption

    % disp(['Iteration no. ' int2str(iteration_counter), ' max con fn diff is ' num2str(iteration_diff)]);

end      
A_next = 500×5 double
         0         0    0.0570    0.2424    0.4277
         0         0    0.0572    0.2426    0.4279
         0         0    0.0578    0.2432    0.4285
         0         0    0.0588    0.2442    0.4295
         0         0    0.0602    0.2456    0.4309
         0         0    0.0620    0.2474    0.4327
         0         0    0.0642    0.2496    0.4349
         0         0    0.0668    0.2522    0.4375
         0         0    0.0698    0.2552    0.4405
         0         0    0.0732    0.2586    0.4439
...
Iteration no. 1 max con fn diff is 50
A_next = 500×5 double
         0         0    0.0847    0.2408    0.4200
         0         0    0.0849    0.2410    0.4202
         0         0    0.0853    0.2415    0.4208
         0         0    0.0860    0.2424    0.4218
         0         0    0.0870    0.2437    0.4232
         0         0    0.0883    0.2453    0.4250
         0         0    0.0899    0.2474    0.4272
         0         0    0.0918    0.2498    0.4298
         0         0    0.0939    0.2525    0.4328
         0         0    0.0964    0.2556    0.4362
...
Iteration no. 2 max con fn diff is 49.8381
A_next = 500×5 double
         0         0    0.0881    0.2397    0.4149
         0         0    0.0882    0.2399    0.4151
         0         0    0.0887    0.2404    0.4157
         0         0    0.0895    0.2413    0.4166
         0         0    0.0906    0.2425    0.4180
         0         0    0.0920    0.2440    0.4197
         0         0    0.0938    0.2459    0.4218
         0         0    0.0958    0.2482    0.4243
         0         0    0.0982    0.2509    0.4273
         0         0    0.1009    0.2540    0.4306
...
Iteration no. 3 max con fn diff is 49.8381
A_next = 500×5 double
         0         0    0.0898    0.2394    0.4109
         0         0    0.0900    0.2396    0.4111
         0         0    0.0904    0.2401    0.4116
         0         0    0.0912    0.2410    0.4126
         0         0    0.0923    0.2422    0.4140
         0         0    0.0937    0.2438    0.4157
         0         0    0.0953    0.2457    0.4178
         0         0    0.0973    0.2481    0.4203
         0         0    0.0996    0.2508    0.4232
         0         0    0.1023    0.2539    0.4265
...
Iteration no. 4 max con fn diff is 0.022531
A_next = 500×5 double
         0         0    0.0893    0.2381    0.4076
         0         0    0.0894    0.2383    0.4078
         0         0    0.0899    0.2388    0.4084
         0         0    0.0906    0.2396    0.4093
         0         0    0.0917    0.2408    0.4106
         0         0    0.0931    0.2424    0.4124
         0         0    0.0948    0.2443    0.4145
         0         0    0.0967    0.2465    0.4169
         0         0    0.0990    0.2492    0.4198
         0         0    0.1016    0.2522    0.4230
...
Iteration no. 5 max con fn diff is 0.016748
A_next = 500×5 double
         0         0    0.0885    0.2362    0.4042
         0         0    0.0887    0.2364    0.4044
         0         0    0.0891    0.2369    0.4050
         0         0    0.0899    0.2378    0.4059
         0         0    0.0910    0.2389    0.4073
         0         0    0.0923    0.2405    0.4089
         0         0    0.0940    0.2423    0.4110
         0         0    0.0960    0.2446    0.4135
         0         0    0.0982    0.2472    0.4163
         0         0    0.1008    0.2502    0.4195
...
Iteration no. 6 max con fn diff is 0.015426
A_next = 500×5 double
         0         0    0.0877    0.2344    0.4011
         0         0    0.0878    0.2346    0.4012
         0         0    0.0883    0.2351    0.4018
         0         0    0.0890    0.2359    0.4027
         0         0    0.0901    0.2371    0.4040
         0         0    0.0914    0.2386    0.4057
         0         0    0.0931    0.2405    0.4078
         0         0    0.0951    0.2427    0.4102
         0         0    0.0973    0.2452    0.4130
         0         0    0.0999    0.2482    0.4162
...
Iteration no. 7 max con fn diff is 0.014611
A_next = 500×5 double
         0         0    0.0868    0.2327    0.3981
         0         0    0.0869    0.2328    0.3983
         0         0    0.0874    0.2333    0.3989
         0         0    0.0881    0.2342    0.3998
         0         0    0.0892    0.2354    0.4011
         0         0    0.0905    0.2369    0.4028
         0         0    0.0922    0.2387    0.4048
         0         0    0.0941    0.2409    0.4072
         0         0    0.0964    0.2434    0.4100
         0         0    0.0990    0.2463    0.4132
...
Iteration no. 8 max con fn diff is 0.013974
A_next = 500×5 double
         0         0    0.0859    0.2311    0.3955
         0         0    0.0861    0.2313    0.3956
         0         0    0.0865    0.2318    0.3962
         0         0    0.0873    0.2326    0.3971
         0         0    0.0883    0.2338    0.3984
         0         0    0.0897    0.2353    0.4001
         0         0    0.0913    0.2371    0.4021
         0         0    0.0933    0.2393    0.4045
         0         0    0.0955    0.2418    0.4073
         0         0    0.0981    0.2446    0.4104
...
Iteration no. 9 max con fn diff is 0.013423
A_next = 500×5 double
         0         0    0.0851    0.2297    0.3931
         0         0    0.0853    0.2299    0.3932
         0         0    0.0857    0.2304    0.3938
         0         0    0.0865    0.2312    0.3947
         0         0    0.0875    0.2323    0.3960
         0         0    0.0889    0.2338    0.3977
         0         0    0.0905    0.2356    0.3997
         0         0    0.0925    0.2378    0.4021
         0         0    0.0947    0.2403    0.4048
         0         0    0.0972    0.2431    0.4079
...
Iteration no. 10 max con fn diff is 0.012917
A_next = 500×5 double
         0         0    0.0844    0.2284    0.3909
         0         0    0.0846    0.2286    0.3911
         0         0    0.0850    0.2291    0.3917
         0         0    0.0858    0.2299    0.3926
         0         0    0.0868    0.2311    0.3939
         0         0    0.0881    0.2325    0.3955
         0         0    0.0898    0.2343    0.3975
         0         0    0.0917    0.2365    0.3999
         0         0    0.0940    0.2389    0.4026
         0         0    0.0965    0.2418    0.4057
...
Iteration no. 11 max con fn diff is 0.012437
A_next = 500×5 double
         0         0    0.0838    0.2273    0.3890
         0         0    0.0839    0.2275    0.3892
         0         0    0.0844    0.2280    0.3898
         0         0    0.0851    0.2288    0.3907
         0         0    0.0862    0.2299    0.3919
         0         0    0.0875    0.2314    0.3936
         0         0    0.0891    0.2332    0.3956
         0         0    0.0911    0.2353    0.3979
         0         0    0.0933    0.2378    0.4007
         0         0    0.0958    0.2406    0.4038
...
Iteration no. 12 max con fn diff is 0.011977
A_next = 500×5 double
         0         0    0.0832    0.2263    0.3874
         0         0    0.0834    0.2265    0.3875
         0         0    0.0838    0.2270    0.3881
         0         0    0.0846    0.2278    0.3890
         0         0    0.0856    0.2289    0.3902
         0         0    0.0869    0.2304    0.3919
         0         0    0.0886    0.2322    0.3939
         0         0    0.0905    0.2343    0.3962
         0         0    0.0927    0.2367    0.3989
         0         0    0.0953    0.2395    0.4020
...
Iteration no. 13 max con fn diff is 0.011535
A_next = 500×5 double
         0         0    0.0828    0.2254    0.3859
         0         0    0.0829    0.2256    0.3861
         0         0    0.0834    0.2261    0.3866
         0         0    0.0841    0.2269    0.3875
         0         0    0.0851    0.2280    0.3888
         0         0    0.0865    0.2295    0.3904
         0         0    0.0881    0.2313    0.3924
         0         0    0.0900    0.2334    0.3947
         0         0    0.0922    0.2358    0.3974
         0         0    0.0947    0.2386    0.4005
...
Iteration no. 14 max con fn diff is 0.011113
A_next = 500×5 double
         0         0    0.0823    0.2247    0.3846
         0         0    0.0825    0.2248    0.3848
         0         0    0.0829    0.2253    0.3853
         0         0    0.0837    0.2261    0.3862
         0         0    0.0847    0.2272    0.3875
         0         0    0.0860    0.2287    0.3891
         0         0    0.0876    0.2305    0.3910
         0         0    0.0896    0.2326    0.3934
         0         0    0.0918    0.2350    0.3961
         0         0    0.0943    0.2378    0.3991
...
Iteration no. 15 max con fn diff is 0.010703
A_next = 500×5 double
         0         0    0.0820    0.2240    0.3835
         0         0    0.0821    0.2241    0.3837
         0         0    0.0826    0.2246    0.3842
         0         0    0.0833    0.2254    0.3851
         0         0    0.0843    0.2266    0.3863
         0         0    0.0856    0.2280    0.3879
         0         0    0.0873    0.2298    0.3899
         0         0    0.0892    0.2319    0.3922
         0         0    0.0914    0.2343    0.3949
         0         0    0.0939    0.2371    0.3980
...
Iteration no. 16 max con fn diff is 0.010312
A_next = 500×5 double
         0         0    0.0816    0.2234    0.3825
         0         0    0.0818    0.2236    0.3827
         0         0    0.0822    0.2240    0.3832
         0         0    0.0830    0.2248    0.3841
         0         0    0.0840    0.2260    0.3854
         0         0    0.0853    0.2274    0.3869
         0         0    0.0869    0.2292    0.3889
         0         0    0.0889    0.2313    0.3912
         0         0    0.0911    0.2337    0.3939
         0         0    0.0936    0.2365    0.3969
...
Iteration no. 17 max con fn diff is 0.0099303
A_next = 500×5 double
         0         0    0.0814    0.2229    0.3817
         0         0    0.0815    0.2231    0.3818
         0         0    0.0820    0.2235    0.3824
         0         0    0.0827    0.2243    0.3833
         0         0    0.0837    0.2255    0.3845
         0         0    0.0850    0.2269    0.3861
         0         0    0.0867    0.2287    0.3880
         0         0    0.0886    0.2308    0.3904
         0         0    0.0908    0.2332    0.3930
         0         0    0.0933    0.2359    0.3961
...
Iteration no. 18 max con fn diff is 0.0095659
A_next = 500×5 double
         0         0    0.0811    0.2225    0.3809
         0         0    0.0813    0.2226    0.3811
         0         0    0.0817    0.2231    0.3816
         0         0    0.0824    0.2239    0.3825
         0         0    0.0835    0.2250    0.3838
         0         0    0.0848    0.2265    0.3853
         0         0    0.0864    0.2282    0.3873
         0         0    0.0883    0.2303    0.3896
         0         0    0.0905    0.2327    0.3923
         0         0    0.0930    0.2355    0.3953
...
Iteration no. 19 max con fn diff is 49.9988
A_next = 500×5 double
         0         0    0.0809    0.2221    0.3803
         0         0    0.0811    0.2222    0.3805
         0         0    0.0815    0.2227    0.3810
         0         0    0.0822    0.2235    0.3819
         0         0    0.0833    0.2246    0.3831
         0         0    0.0846    0.2261    0.3847
         0         0    0.0862    0.2278    0.3866
         0         0    0.0881    0.2299    0.3889
         0         0    0.0903    0.2323    0.3916
         0         0    0.0928    0.2351    0.3946
...
Iteration no. 20 max con fn diff is 49.9988
A_next = 500×5 double
         0         0    0.0807    0.2217    0.3797
         0         0    0.0809    0.2219    0.3799
         0         0    0.0813    0.2224    0.3804
         0         0    0.0821    0.2232    0.3813
         0         0    0.0831    0.2243    0.3826
         0         0    0.0844    0.2257    0.3841
         0         0    0.0860    0.2275    0.3861
         0         0    0.0879    0.2296    0.3884
         0         0    0.0901    0.2320    0.3910
         0         0    0.0926    0.2347    0.3940
...
Iteration no. 21 max con fn diff is 49.9958
A_next = 500×5 double
         0         0    0.0806    0.2215    0.3793
         0         0    0.0807    0.2216    0.3794
         0         0    0.0812    0.2221    0.3800
         0         0    0.0819    0.2229    0.3808
         0         0    0.0829    0.2240    0.3821
         0         0    0.0842    0.2255    0.3837
         0         0    0.0859    0.2272    0.3856
         0         0    0.0878    0.2293    0.3879
         0         0    0.0900    0.2317    0.3905
         0         0    0.0925    0.2344    0.3936
...
Iteration no. 22 max con fn diff is 49.9958
A_next = 500×5 double
         0         0    0.0804    0.2212    0.3789
         0         0    0.0806    0.2214    0.3790
         0         0    0.0810    0.2218    0.3796
         0         0    0.0818    0.2226    0.3804
         0         0    0.0828    0.2238    0.3817
         0         0    0.0841    0.2252    0.3832
         0         0    0.0857    0.2270    0.3852
         0         0    0.0876    0.2290    0.3875
         0         0    0.0898    0.2314    0.3901
         0         0    0.0923    0.2342    0.3931
...
Iteration no. 23 max con fn diff is 49.9865
A_next = 500×5 double
         0         0    0.0803    0.2210    0.3785
         0         0    0.0805    0.2212    0.3787
         0         0    0.0809    0.2216    0.3792
         0         0    0.0816    0.2224    0.3801
         0         0    0.0827    0.2236    0.3813
         0         0    0.0840    0.2250    0.3829
         0         0    0.0856    0.2267    0.3848
         0         0    0.0875    0.2288    0.3871
         0         0    0.0897    0.2312    0.3897
         0         0    0.0922    0.2339    0.3928
...
Iteration no. 24 max con fn diff is 49.9865
A_next = 500×5 double
         0         0    0.0802    0.2208    0.3782
         0         0    0.0804    0.2210    0.3784
         0         0    0.0808    0.2215    0.3789
         0         0    0.0815    0.2223    0.3798
         0         0    0.0826    0.2234    0.3810
         0         0    0.0839    0.2248    0.3826
         0         0    0.0855    0.2266    0.3845
         0         0    0.0874    0.2286    0.3868
         0         0    0.0896    0.2310    0.3894
         0         0    0.0921    0.2338    0.3924
...
Iteration no. 25 max con fn diff is 49.9774
A_next = 500×5 double
         0         0    0.0801    0.2207    0.3779
         0         0    0.0803    0.2208    0.3781
         0         0    0.0807    0.2213    0.3786
         0         0    0.0815    0.2221    0.3795
         0         0    0.0825    0.2232    0.3807
         0         0    0.0838    0.2246    0.3823
         0         0    0.0854    0.2264    0.3842
         0         0    0.0873    0.2285    0.3865
         0         0    0.0895    0.2309    0.3892
         0         0    0.0920    0.2336    0.3922
...
Iteration no. 26 max con fn diff is 49.9774
A_next = 500×5 double
         0         0    0.0801    0.2205    0.3777
         0         0    0.0802    0.2207    0.3779
         0         0    0.0807    0.2212    0.3784
         0         0    0.0814    0.2220    0.3793
         0         0    0.0824    0.2231    0.3805
         0         0    0.0837    0.2245    0.3821
         0         0    0.0853    0.2263    0.3840
         0         0    0.0872    0.2283    0.3863
         0         0    0.0894    0.2307    0.3889
         0         0    0.0919    0.2335    0.3919
...
Iteration no. 27 max con fn diff is 49.969
A_next = 500×5 double
         0         0    0.0800    0.2204    0.3775
         0         0    0.0801    0.2206    0.3777
         0         0    0.0806    0.2210    0.3782
         0         0    0.0813    0.2218    0.3791
         0         0    0.0823    0.2230    0.3803
         0         0    0.0837    0.2244    0.3819
         0         0    0.0853    0.2262    0.3838
         0         0    0.0872    0.2282    0.3861
         0         0    0.0894    0.2306    0.3887
         0         0    0.0919    0.2333    0.3917
...
Iteration no. 28 max con fn diff is 49.969
A_next = 500×5 double
         0         0    0.0799    0.2203    0.3773
         0         0    0.0801    0.2205    0.3775
         0         0    0.0805    0.2209    0.3780
         0         0    0.0813    0.2217    0.3789
         0         0    0.0823    0.2229    0.3801
         0         0    0.0836    0.2243    0.3817
         0         0    0.0852    0.2260    0.3836
         0         0    0.0871    0.2281    0.3859
         0         0    0.0893    0.2305    0.3886
         0         0    0.0918    0.2332    0.3915
...
Iteration no. 29 max con fn diff is 49.9612
A_next = 500×5 double
         0         0    0.0799    0.2202    0.3772
         0         0    0.0800    0.2204    0.3774
         0         0    0.0805    0.2209    0.3779
         0         0    0.0812    0.2217    0.3788
         0         0    0.0822    0.2228    0.3800
         0         0    0.0836    0.2242    0.3816
         0         0    0.0852    0.2260    0.3835
         0         0    0.0871    0.2280    0.3858
         0         0    0.0893    0.2304    0.3884
         0         0    0.0918    0.2331    0.3914
...
Iteration no. 30 max con fn diff is 49.9612
A_next = 500×5 double
         0         0    0.0799    0.2202    0.3771
         0         0    0.0800    0.2203    0.3772
         0         0    0.0804    0.2208    0.3778
         0         0    0.0812    0.2216    0.3786
         0         0    0.0822    0.2227    0.3799
         0         0    0.0835    0.2241    0.3814
         0         0    0.0851    0.2259    0.3834
         0         0    0.0870    0.2280    0.3856
         0         0    0.0892    0.2303    0.3883
         0         0    0.0917    0.2331    0.3913
...
Iteration no. 31 max con fn diff is 49.954
A_next = 500×5 double
         0         0    0.0798    0.2201    0.3770
         0         0    0.0800    0.2202    0.3771
         0         0    0.0804    0.2207    0.3777
         0         0    0.0811    0.2215    0.3785
         0         0    0.0822    0.2226    0.3798
         0         0    0.0835    0.2241    0.3813
         0         0    0.0851    0.2258    0.3833
         0         0    0.0870    0.2279    0.3855
         0         0    0.0892    0.2303    0.3882
         0         0    0.0917    0.2330    0.3912
...
Iteration no. 32 max con fn diff is 49.954
A_next = 500×5 double
         0         0    0.0798    0.2200    0.3769
         0         0    0.0799    0.2202    0.3770
         0         0    0.0804    0.2207    0.3776
         0         0    0.0811    0.2215    0.3784
         0         0    0.0821    0.2226    0.3797
         0         0    0.0834    0.2240    0.3812
         0         0    0.0851    0.2258    0.3832
         0         0    0.0870    0.2278    0.3854
         0         0    0.0892    0.2302    0.3881
         0         0    0.0916    0.2329    0.3911
...
Iteration no. 33 max con fn diff is 49.9474
A_next = 500×5 double
         0         0    0.0798    0.2200    0.3768
         0         0    0.0799    0.2201    0.3770
         0         0    0.0804    0.2206    0.3775
         0         0    0.0811    0.2214    0.3784
         0         0    0.0821    0.2225    0.3796
         0         0    0.0834    0.2240    0.3812
         0         0    0.0850    0.2257    0.3831
         0         0    0.0869    0.2278    0.3854
         0         0    0.0891    0.2302    0.3880
         0         0    0.0916    0.2329    0.3910
...
Iteration no. 34 max con fn diff is 49.9474
A_next = 500×5 double
         0         0    0.0797    0.2200    0.3767
         0         0    0.0799    0.2201    0.3769
         0         0    0.0803    0.2206    0.3774
         0         0    0.0811    0.2214    0.3783
         0         0    0.0821    0.2225    0.3795
         0         0    0.0834    0.2239    0.3811
         0         0    0.0850    0.2257    0.3830
         0         0    0.0869    0.2277    0.3853
         0         0    0.0891    0.2301    0.3879
         0         0    0.0916    0.2328    0.3909
...
Iteration no. 35 max con fn diff is 49.9412
A_next = 500×5 double
         0         0    0.0797    0.2199    0.3767
         0         0    0.0799    0.2201    0.3768
         0         0    0.0803    0.2206    0.3774
         0         0    0.0810    0.2213    0.3782
         0         0    0.0821    0.2225    0.3795
         0         0    0.0834    0.2239    0.3810
         0         0    0.0850    0.2256    0.3830
         0         0    0.0869    0.2277    0.3852
         0         0    0.0891    0.2301    0.3879
         0         0    0.0916    0.2328    0.3908
...
Iteration no. 36 max con fn diff is 49.9412
A_next = 500×5 double
         0         0    0.0797    0.2199    0.3766
         0         0    0.0799    0.2200    0.3768
         0         0    0.0803    0.2205    0.3773
         0         0    0.0810    0.2213    0.3782
         0         0    0.0821    0.2224    0.3794
         0         0    0.0834    0.2239    0.3810
         0         0    0.0850    0.2256    0.3829
         0         0    0.0869    0.2277    0.3852
         0         0    0.0891    0.2301    0.3878
         0         0    0.0916    0.2328    0.3908
...
Iteration no. 37 max con fn diff is 49.9356
A_next = 500×5 double
         0         0    0.0797    0.2199    0.3766
         0         0    0.0798    0.2200    0.3767
         0         0    0.0803    0.2205    0.3773
         0         0    0.0810    0.2213    0.3781
         0         0    0.0820    0.2224    0.3794
         0         0    0.0834    0.2238    0.3809
         0         0    0.0850    0.2256    0.3829
         0         0    0.0869    0.2277    0.3851
         0         0    0.0891    0.2300    0.3878
         0         0    0.0915    0.2328    0.3907
...
Iteration no. 38 max con fn diff is 49.9356
A_next = 500×5 double
         0         0    0.0797    0.2198    0.3765
         0         0    0.0798    0.2200    0.3767
         0         0    0.0803    0.2205    0.3772
         0         0    0.0810    0.2213    0.3781
         0         0    0.0820    0.2224    0.3793
         0         0    0.0833    0.2238    0.3809
         0         0    0.0849    0.2256    0.3828
         0         0    0.0868    0.2276    0.3851
         0         0    0.0890    0.2300    0.3877
         0         0    0.0915    0.2327    0.3907
...
Iteration no. 39 max con fn diff is 49.9304
A_next = 500×5 double
         0         0    0.0797    0.2198    0.3765
         0         0    0.0798    0.2200    0.3767
         0         0    0.0803    0.2205    0.3772
         0         0    0.0810    0.2213    0.3781
         0         0    0.0820    0.2224    0.3793
         0         0    0.0833    0.2238    0.3809
         0         0    0.0849    0.2256    0.3828
         0         0    0.0868    0.2276    0.3851
         0         0    0.0890    0.2300    0.3877
         0         0    0.0915    0.2327    0.3907
...
Iteration no. 40 max con fn diff is 0.069343
A_next = 500×5 double
         0         0    0.0797    0.2198    0.3765
         0         0    0.0798    0.2200    0.3766
         0         0    0.0803    0.2204    0.3772
         0         0    0.0810    0.2212    0.3780
         0         0    0.0820    0.2224    0.3793
         0         0    0.0833    0.2238    0.3808
         0         0    0.0849    0.2255    0.3828
         0         0    0.0868    0.2276    0.3850
         0         0    0.0890    0.2300    0.3877
         0         0    0.0915    0.2327    0.3906
...
Iteration no. 41 max con fn diff is 49.9998
A_next = 500×5 double
         0         0    0.0797    0.2198    0.3765
         0         0    0.0798    0.2200    0.3766
         0         0    0.0802    0.2204    0.3772
         0         0    0.0810    0.2212    0.3780
         0         0    0.0820    0.2223    0.3792
         0         0    0.0833    0.2238    0.3808
         0         0    0.0849    0.2255    0.3827
         0         0    0.0868    0.2276    0.3850
         0         0    0.0890    0.2300    0.3876
         0         0    0.0915    0.2327    0.3906
...
Iteration no. 42 max con fn diff is 49.9235
A_next = 500×5 double
         0         0    0.0797    0.2198    0.3764
         0         0    0.0798    0.2199    0.3766
         0         0    0.0802    0.2204    0.3771
         0         0    0.0810    0.2212    0.3780
         0         0    0.0820    0.2223    0.3792
         0         0    0.0833    0.2238    0.3808
         0         0    0.0849    0.2255    0.3827
         0         0    0.0868    0.2276    0.3850
         0         0    0.0890    0.2300    0.3876
         0         0    0.0915    0.2327    0.3906
...
Iteration no. 43 max con fn diff is 0.067045
A_next = 500×5 double
         0         0    0.0797    0.2198    0.3764
         0         0    0.0798    0.2199    0.3766
         0         0    0.0802    0.2204    0.3771
         0         0    0.0810    0.2212    0.3780
         0         0    0.0820    0.2223    0.3792
         0         0    0.0833    0.2237    0.3808
         0         0    0.0849    0.2255    0.3827
         0         0    0.0868    0.2276    0.3850
         0         0    0.0890    0.2300    0.3876
         0         0    0.0915    0.2327    0.3906
...
Iteration no. 44 max con fn diff is 0.0032958
A_next = 500×5 double
         0         0    0.0796    0.2198    0.3764
         0         0    0.0798    0.2199    0.3766
         0         0    0.0802    0.2204    0.3771
         0         0    0.0810    0.2212    0.3780
         0         0    0.0820    0.2223    0.3792
         0         0    0.0833    0.2237    0.3808
         0         0    0.0849    0.2255    0.3827
         0         0    0.0868    0.2276    0.3850
         0         0    0.0890    0.2299    0.3876
         0         0    0.0915    0.2327    0.3906
...
Iteration no. 45 max con fn diff is 0.0031623
A_next = 500×5 double
         0         0    0.0796    0.2198    0.3764
         0         0    0.0798    0.2199    0.3766
         0         0    0.0802    0.2204    0.3771
         0         0    0.0810    0.2212    0.3780
         0         0    0.0820    0.2223    0.3792
         0         0    0.0833    0.2237    0.3808
         0         0    0.0849    0.2255    0.3827
         0         0    0.0868    0.2276    0.3850
         0         0    0.0890    0.2299    0.3876
         0         0    0.0915    0.2326    0.3906
...
Iteration no. 46 max con fn diff is 0.0030312
A_next = 500×5 double
         0         0    0.0796    0.2198    0.3764
         0         0    0.0798    0.2199    0.3766
         0         0    0.0802    0.2204    0.3771
         0         0    0.0810    0.2212    0.3780
         0         0    0.0820    0.2223    0.3792
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2255    0.3827
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3876
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 47 max con fn diff is 0.0029078
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3764
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3771
         0         0    0.0809    0.2212    0.3779
         0         0    0.0820    0.2223    0.3792
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2255    0.3827
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3876
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 48 max con fn diff is 0.0027873
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3764
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3771
         0         0    0.0809    0.2212    0.3779
         0         0    0.0820    0.2223    0.3792
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2255    0.3827
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3876
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 49 max con fn diff is 0.0026695
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3764
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3771
         0         0    0.0809    0.2212    0.3779
         0         0    0.0820    0.2223    0.3792
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2255    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 50 max con fn diff is 0.0025563
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2212    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2255    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 51 max con fn diff is 0.0024478
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2212    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2255    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 52 max con fn diff is 0.0023438
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2212    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2255    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 53 max con fn diff is 0.0022441
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2212    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2255    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 54 max con fn diff is 0.0021486
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2212    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 55 max con fn diff is 0.002057
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2212    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 56 max con fn diff is 0.0019692
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2212    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 57 max con fn diff is 0.0018851
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2212    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 58 max con fn diff is 0.0018046
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2212    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 59 max con fn diff is 0.0017274
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2212    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 60 max con fn diff is 0.0016534
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 61 max con fn diff is 0.0015826
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 62 max con fn diff is 0.0015147
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 63 max con fn diff is 0.0014498
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 64 max con fn diff is 0.0013875
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 65 max con fn diff is 0.0013279
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 66 max con fn diff is 0.0012709
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 67 max con fn diff is 0.0012162
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 68 max con fn diff is 0.0011639
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 69 max con fn diff is 0.0011138
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 70 max con fn diff is 0.0010659
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 71 max con fn diff is 0.00102
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 72 max con fn diff is 0.00097604
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 73 max con fn diff is 0.00093398
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 74 max con fn diff is 0.00089371
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 75 max con fn diff is 0.00085517
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 76 max con fn diff is 0.00081828
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 77 max con fn diff is 0.00078298
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 78 max con fn diff is 0.00074919
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 79 max con fn diff is 0.00071685
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 80 max con fn diff is 0.00068591
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 81 max con fn diff is 0.00065629
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 82 max con fn diff is 0.00062795
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 83 max con fn diff is 0.00060083
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 84 max con fn diff is 0.00057488
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 85 max con fn diff is 0.00055004
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 86 max con fn diff is 0.00052628
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 87 max con fn diff is 0.00050354
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 88 max con fn diff is 0.00048179
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 89 max con fn diff is 0.00046097
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 90 max con fn diff is 0.00044105
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 91 max con fn diff is 0.00042199
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 92 max con fn diff is 0.00040376
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 93 max con fn diff is 0.00038631
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 94 max con fn diff is 0.00036962
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 95 max con fn diff is 0.00035365
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 96 max con fn diff is 0.00033837
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 97 max con fn diff is 0.00032375
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 98 max con fn diff is 0.00030977
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 99 max con fn diff is 0.00029639
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 100 max con fn diff is 0.00028359
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 101 max con fn diff is 0.00027134
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 102 max con fn diff is 0.00025962
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 103 max con fn diff is 0.00024841
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 104 max con fn diff is 0.00023769
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 105 max con fn diff is 0.00022743
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 106 max con fn diff is 0.00021761
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 107 max con fn diff is 0.00020822
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 108 max con fn diff is 0.00019924
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 109 max con fn diff is 0.00019064
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 110 max con fn diff is 0.00018242
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 111 max con fn diff is 0.00017455
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 112 max con fn diff is 0.00016703
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 113 max con fn diff is 0.00015983
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 114 max con fn diff is 0.00015294
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 115 max con fn diff is 0.00014635
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 116 max con fn diff is 0.00014004
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 117 max con fn diff is 0.00013401
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 118 max con fn diff is 0.00012824
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 119 max con fn diff is 0.00012272
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 120 max con fn diff is 0.00011743
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 121 max con fn diff is 0.00011238
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 122 max con fn diff is 0.00010755
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 123 max con fn diff is 0.00010292
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 124 max con fn diff is 9.8494e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 125 max con fn diff is 9.426e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 126 max con fn diff is 9.0209e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 127 max con fn diff is 8.6333e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 128 max con fn diff is 8.2624e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 129 max con fn diff is 7.9076e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 130 max con fn diff is 7.5681e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 131 max con fn diff is 7.2433e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 132 max con fn diff is 6.9325e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 133 max con fn diff is 6.6352e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 134 max con fn diff is 6.3506e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 135 max con fn diff is 6.0784e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 136 max con fn diff is 5.8179e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 137 max con fn diff is 5.5687e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 138 max con fn diff is 5.3302e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 139 max con fn diff is 5.102e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 140 max con fn diff is 4.8837e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 141 max con fn diff is 4.6747e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 142 max con fn diff is 4.4748e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 143 max con fn diff is 4.2835e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 144 max con fn diff is 4.1004e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 145 max con fn diff is 3.9253e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 146 max con fn diff is 3.7576e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 147 max con fn diff is 3.5972e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 148 max con fn diff is 3.4437e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 149 max con fn diff is 3.2968e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 150 max con fn diff is 3.1562e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 151 max con fn diff is 3.0217e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 152 max con fn diff is 2.8929e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 153 max con fn diff is 2.7697e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 154 max con fn diff is 2.6518e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 155 max con fn diff is 2.5389e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 156 max con fn diff is 2.4309e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 157 max con fn diff is 2.3275e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 158 max con fn diff is 2.2286e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 159 max con fn diff is 2.1339e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 160 max con fn diff is 2.0433e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 161 max con fn diff is 1.9565e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 162 max con fn diff is 1.8735e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 163 max con fn diff is 1.794e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 164 max con fn diff is 1.718e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 165 max con fn diff is 1.6451e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 166 max con fn diff is 1.5754e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 167 max con fn diff is 1.5087e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 168 max con fn diff is 1.4448e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 169 max con fn diff is 1.3836e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 170 max con fn diff is 1.325e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 171 max con fn diff is 1.2689e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 172 max con fn diff is 1.2151e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 173 max con fn diff is 1.1636e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 174 max con fn diff is 1.1141e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 175 max con fn diff is 1.0667e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 176 max con fn diff is 1.0211e-05
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 177 max con fn diff is 9.7734e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 178 max con fn diff is 9.3523e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 179 max con fn diff is 8.9467e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 180 max con fn diff is 8.5555e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 181 max con fn diff is 8.1778e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 182 max con fn diff is 7.8124e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 183 max con fn diff is 7.4585e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 184 max con fn diff is 7.115e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 185 max con fn diff is 6.7813e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 186 max con fn diff is 6.4565e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 187 max con fn diff is 6.14e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 188 max con fn diff is 5.8312e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 189 max con fn diff is 5.5298e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 190 max con fn diff is 5.2354e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 191 max con fn diff is 4.9479e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 192 max con fn diff is 4.6672e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 193 max con fn diff is 4.3933e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 194 max con fn diff is 4.1265e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 195 max con fn diff is 3.8669e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 196 max con fn diff is 3.6148e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 197 max con fn diff is 3.3707e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 198 max con fn diff is 3.1349e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 199 max con fn diff is 2.9078e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 200 max con fn diff is 2.6898e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 201 max con fn diff is 2.4813e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 202 max con fn diff is 2.2825e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 203 max con fn diff is 2.0937e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 204 max con fn diff is 1.9151e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 205 max con fn diff is 1.7467e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 206 max con fn diff is 1.5887e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 207 max con fn diff is 1.441e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 208 max con fn diff is 1.3035e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 209 max con fn diff is 1.1759e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 210 max con fn diff is 1.058e-06
A_next = 500×5 double
         0         0    0.0796    0.2197    0.3763
         0         0    0.0798    0.2199    0.3765
         0         0    0.0802    0.2204    0.3770
         0         0    0.0809    0.2211    0.3779
         0         0    0.0820    0.2223    0.3791
         0         0    0.0833    0.2237    0.3807
         0         0    0.0849    0.2254    0.3826
         0         0    0.0868    0.2275    0.3849
         0         0    0.0890    0.2299    0.3875
         0         0    0.0915    0.2326    0.3905
...
Iteration no. 211 max con fn diff is 9.4942e-07

For borrowing constraint binding case, people may have several other ways.

Alternative 1: Loop over i_a and interpolate over single point terpolate

    % for ia  = 1:na 
    %       if a_grid(ia) < a_endo(1,iy)           %borrowing constraint binds
    %           a_next(ia,iy) = borrow_limit;                
    %       else %borrowing constraint does not bind;
    %           a_next(ia,iy) = lininterp1(ass1(:,iy),agrid,agrid(ia));         
    %       end                
    % end

This method needs a local function “lininterp1”, which is for linear interpolation.

Alternative 2: Use logical operations to find index where borrowing constraint binds

    % bind_index = (A_matrix + Y_matrix - c_next) < 0;   %find index where borrowing constraint binds
    % c_next(bind_index) = A_matrix(bind_index) + Y_matrix(bind_index);

The above code just illustrates the idea, we need to modify when use it.

Simulation#

Simulate for 1000 periods.

%% Code Cell 5: Simulation

%% DRAW RANDOM NUMBERS
rng(100);
Y_random = rand(simulation_n_size, simulation_t_size);  
% generate a random matrix, 
% row is n individual, 
% column is t period

Y_simulation_index = zeros(simulation_n_size,simulation_t_size);
A_simulation = zeros(simulation_n_size,simulation_t_size);
    
%create interpolating function
%for i_y = 1:y_grid_size
%    savinterp{i_y} = griddedInterpolant(a_grid,sav(:,i_y),'linear');
%end
    
%loop over time periods
for i_t = 1:simulation_t_size
    if mod(i_t,100) ==0
        disp([' Simulating, time period ' int2str(i_t)]);
    end
        
    %income realization: note we vectorize simulations at once because
    %of matlab, in other languages we would loop over individuals
    Y_simulation_index(Y_random(:,i_t)<= y_cum_distribution(1),i_t) = 1;
    % for those random small than first pdf, give index 1

    for i_y = 2:y_grid_size
        Y_simulation_index(Y_random(:,i_t) > y_cum_distribution(i_y - 1) & Y_random(:,i_t) <= y_cum_distribution(i_y),i_t) = i_y;
    end
    % for those random between pdf interval, give index
        
    % asset choice
    if i_t < simulation_t_size
        for i_y = 1 : y_grid_size
            A_simulation(Y_simulation_index(:,i_t)==i_y, i_t + 1) = ...
            interp1(a_grid, A_next(:,i_y), A_simulation(Y_simulation_index(:,i_t)==i_y,i_t));
        end
    end

end
    
%assign actual income values;
Y_simulation = y_grid(Y_simulation_index);
 Simulating, time period 100
 Simulating, time period 200
 Simulating, time period 300
 Simulating, time period 400
 Simulating, time period 500
 Simulating, time period 600
 Simulating, time period 700
 Simulating, time period 800
 Simulating, time period 900
 Simulating, time period 1000

People sometimes use griddedInterpolant, since it enables object to interpolate, which is very flexible.

In order to not learn something new nor complicated, I still use interp1 here.

I prefer to learn as less as possible, learning too much makes me tired.

Graph#

%% Code Cell 6: Make Plots

figure(1);
    
% consumption policy function
subplot(3,2,1);
plot(a_grid,C_next(:,1),'b-',a_grid,C_next(:,y_grid_size),'r-','LineWidth',1);
grid;
xlim([0 a_max]);
title('Consumption Policy Function');
legend('Lowest income state','Highest income state');

% savings policy function
subplot(3,2,2);
plot(a_grid,A_next(:,1)-a_grid,'b-',a_grid,A_next(:,y_grid_size)-a_grid,'r-','LineWidth',1);
hold on;
plot(a_grid,zeros(a_grid_size,1),'k','LineWidth',0.5);
hold off;
grid;
xlim([0 a_max]);
title('Savings Policy Function (a''-a)');
    
% consumption policy function: zoomed in
subplot(3,2,3);
plot(a_grid,C_next(:,1),'b-o',a_grid,C_next(:,y_grid_size),'r-o','LineWidth',2);
grid;
xlim([0 1]);
title('Consumption: Zoomed'); 
 
%income distribution
subplot(3,2,4);
hist(Y_simulation(:,simulation_t_size),y_grid);
h = findobj(gca,'Type','patch');
set(h,'FaceColor',[0 0.5 0.5],'EdgeColor','blue','LineStyle','-');
ylabel('')
title('Income distribution');
    
%asset distribution
subplot(3,2,5);
hist(A_simulation(:,simulation_t_size),100);
h = findobj(gca,'Type','patch');
set(h,'FaceColor',[.7 .7 .7],'EdgeColor','black','LineStyle','-');
ylabel('')
title('Asset distribution');

%convergence check
subplot(3,2,6);
plot([1:simulation_t_size]',mean(A_simulation,1),'k-','LineWidth',1.5);
ylabel('Time Period');
title('Mean Asset Convergence');
    
    
% asset distribution statistics
aysim = A_simulation(:,simulation_t_size) ./ mean(Y_simulation(:,simulation_t_size));
disp(['Mean assets (relative to mean income) : ' num2str(mean(aysim))]);
disp(['Fraction borrowing constrained: ' num2str(sum(aysim==borrow_limit)./simulation_n_size * 100) '%']);
disp(['10th Percentile: ' num2str(quantile(aysim,.1))]);
disp(['50th Percentile: ' num2str(quantile(aysim,.5))]);
disp(['90th Percentile: ' num2str(quantile(aysim,.9))]);
disp(['99th Percentile: ' num2str(quantile(aysim,.99))]);
_images/93db4454489f35d40776172f157928b87914e82e644e29d0363813e96cb75373.png
Mean assets (relative to mean income) : 0.55045
Fraction borrowing constrained: 2.96%
10th Percentile: 0.11735
50th Percentile: 0.49915
90th Percentile: 1.0425
99th Percentile: 1.5788

Compute MPC#

When MPC is very small, an increase in asset almost has no effect on consumption. So, we have:

\[ u'(1+MPC) = \beta (1+r) u'(1+r) \]
\[ (1+MPC)^{-\gamma} = \beta(1+r) (1+r)^{-\gamma} \]

Rearrange and get:

\[ MPC = (1+r)[\beta (1+r)]^{-\frac{1}{\gamma}} - 1 \]

In the following code, griddedInterpolant is used instead of interp1, for its object.

If we use interp1, the code is too long.

%% Code Cell 7: Compute MPCs

    
%theoretical mpc lower bound
mpc_limit = (1+r)*((beta*(1+r))^-(1./gamma))-1;
  
for i_y = 1:y_grid_size
    %create interpolating function
    C_interp{i_y} = griddedInterpolant(a_grid,C_current(:,i_y),'linear');
        
    mpc1(:,i_y) = ( C_interp{i_y}(a_grid+mpc_amount1) - C_current(:,i_y) ) ./ mpc_amount1;
    mpc2(:,i_y) = ( C_interp{i_y}(a_grid+mpc_amount2) - C_current(:,i_y) ) ./ mpc_amount2;
        
end

    
figure(2);
    
% mpc functions
subplot(1,2,1);
plot(a_grid,mpc1(:,1),'b-',a_grid,mpc2(:,1),'b--',...
    a_grid,mpc1(:,y_grid_size),'r-',a_grid,mpc2(:,y_grid_size),'r--','LineWidth',1);
hold on;
plot(a_grid,mpc_limit.*ones(size(a_grid)),'k:','LineWidth',2);    
hold off;
grid on;
xlim([0 10]);
title('MPC Function');
legend('Lowest income state: amount 1','Lowest income state: amount 1',...
    'Highest income state: amount 2','Lowest income state: amount 2',...
    ['Theoretical MPC limit = ', num2str(mpc_limit)],'Location','NorthEast');
    
% mpc distribution
mpc1_simulation = zeros(simulation_n_size,1);
mpc2_simulation = zeros(simulation_n_size,1);
for i_y = 1:y_grid_size
    mpc1_simulation(Y_simulation_index(:,simulation_t_size)==i_y) = ...
        ( C_interp{i_y}(A_simulation(Y_simulation_index(:,simulation_t_size)==i_y,simulation_t_size) + mpc_amount1) ...
        - C_interp{i_y}(A_simulation(Y_simulation_index(:,simulation_t_size)==i_y,simulation_t_size)) ) ./ mpc_amount1;
    mpc2_simulation(Y_simulation_index(:,simulation_t_size)==i_y) = ...
        ( C_interp{i_y}(A_simulation(Y_simulation_index(:,simulation_t_size)==i_y,simulation_t_size) + mpc_amount2) ...
        - C_interp{i_y}(A_simulation(Y_simulation_index(:,simulation_t_size)==i_y,simulation_t_size)) ) ./ mpc_amount2;
end
    
subplot(1,2,2);
histogram(mpc1_simulation,[0:0.02:1.5]);
grid on;
h = findobj(gca,'Type','patch');
set(h,'FaceColor',[.7 .7 .7],'EdgeColor','black','LineStyle','-');
ylabel('')
title('MPC distribution');
    
% mpc distribution statistics
disp(['Mean MPC amount 1: ' num2str(mean(mpc1_simulation))]);
disp(['Mean MPC amount 2: ' num2str(mean(mpc2_simulation))]);
    
_images/7cb2e1aec067c069eaeb05691bcb14fca62df09c7459014c4cfbeea74b80ff8e.png
Mean MPC amount 1: 0.19102
Mean MPC amount 2: 0.17411

2. Extend to Stationary Equilibrium: Solve Aiyagari Model#


In the basic model, interest rate and income is exogenous. In stationary equilibiurm of Aiyagari model, these two variables are endogenous.

The process to solve Aiyagari Model is as follows.

While in basic optimal consumption with income fluctuation, the process is as follows.

So, in code, the main difference is:

1. Loop over capital, to get interest rate and income.

2. Interest rate and income is endogenous.

Parameters#

cd"C:\Users\ading\A_TA_Notes"
pwd
ans = 'C:\Users\ading\A_TA_Notes'
clear all;  % Clears all variables from the workspace
close all;  % Closes all open figure windows
clc;        % Clears the Command Window

In parameters part, compared to basic model, changes are:

No longer give exogenous interst rate r. Introduce production parameters to calculate r.

Give one more set iteration parameters for capital K loop. And give initial guess of r and capital K.
%% Code Cell 8: Parameters for Aiyagari

% Households
gamma   = 2;        % risk aversion in consumption utility function 
beta = 0.95;        % How much future utility is worth today

% Production
deprec      = 0.10;
capshare    = 0.4;

% Household income: discretize a normal distribution N(mu,sigma^2)
y_mu    = 1;       % mean of distribution
y_sd    = 0.2;     % standard deviation of income distribution
y_grid_size      = 5;       % number of grid

width = fzero(@(x)discrete_normal(y_grid_size, y_mu, y_sd, x),2);
[temp, y_grid, y_distribution] = discrete_normal(y_grid_size, y_mu, y_sd, width);
y_cum_distribution = cumsum(y_distribution);   % cumulative distribution

% Asset gridss
a_grid_size          = 50;
a_max        = 50; 
borrow_limit  = 0;
a_grid_power   = 0.5; %1 for linear, 0 for L-shaped

a_grid = linspace(0,1,a_grid_size)';
a_grid = a_grid.^(1./a_grid_power);
a_grid = borrow_limit + (a_max - borrow_limit).*a_grid;

% Iteration setting
iteration_max    = 1000;   % maxium iteration
iteration_tolerance    = 1.0e-6; % Tolerance for convergence 


% Simulation setting
simulation_n_size        = 50000;    % number of simulation individuals
simulation_t_size        = 1000;     % number of simulaton periods

% Iteration setting for capital
iteration_max_KL  = 70;
iteration_tolerance_KL      = 1.0e-5;
step_KL     = 0.005;



r_guess      = 1./beta-1 - 0.001; % a bit lower than inverse of discount rate
KLratio_guess = ((r_guess + deprec)/capshare)^(1/(capshare - 1));

Run “Code Cell 2: Local function to facilitate expression”.

%% Code Cell 2: Local function to facilitate expression

% Utility function
if gamma == 1
    u = @(c)log(c);
else    
    u = @(c)(c.^(1-gamma)-1)./(1-gamma);
end    

% Derivative of utility function to consumption
u1 = @(c) c.^(-gamma);               

% When we have u1, how to get consumption.
u1_inverse = @(u) u.^(-1./gamma);
%% Code Cell 3: Initialize value functions and consumption function

C_current = zeros(a_grid_size, y_grid_size);      % current consumption
C_endo    = zeros(a_grid_size, y_grid_size);      % endogenous consumption from Euler equation
C_next    = zeros(a_grid_size, y_grid_size);      % next consumption from interpolation/budget constraint 
A_endo    = zeros(a_grid_size, y_grid_size);      % endogenous asset from budget constraint
A_next    = zeros(a_grid_size, y_grid_size);      % next asset from interpolation/budget constraint

[A_matrix Y_matrix]=ndgrid(a_grid, y_grid);

We need to simulate individuals first, so that we can get aggregate capital.

%% Code Cell 9: Simulate labor efficiency realizations

% Draw random numbers
rng(100);
Y_random = rand(simulation_n_size, simulation_t_size);

% Simulate
Y_simulation_index = zeros(simulation_n_size, simulation_t_size);
    
for i_t = 1 : simulation_t_size
    %income realization: note we vectorize simulations at once because
    %of matlab, in other languages we would loop over individuals
    Y_simulation_index( Y_random(:,i_t) <= y_cum_distribution(1), i_t ) = 1;
    for i_y = 2:y_grid_size
        Y_simulation_index( Y_random(:,i_t) > y_cum_distribution(i_y-1) & Y_random(:,i_t) <= y_cum_distribution(i_y), i_t) = i_y;
    end
end
    
Y_simulation = y_grid(Y_simulation_index);

% initial simulation for asset
A_simulation = zeros(simulation_n_size,simulation_t_size);

Iteration#

%% Iterate over Kl ratio

KLratio = KLratio_guess;

iteration_counter_KL = 0;
iteration_diff_KL = 100; 
while iteration_counter_KL <= iteration_max_KL && abs(iteration_diff_KL)>iteration_tolerance_KL
    iteration_counter_KL = iteration_counter_KL + 1;

    r   = capshare.*KLratio^(capshare-1) - deprec;
    R   = 1+r;
    wage= (1-capshare).* KLratio^capshare;
    % rescale efficiency units of labor so that output = 1.
    % yscale = Y/L
    yscale = (KLratio^-capshare)./(y_grid'*y_distribution);

    C_guess = r.*A_matrix + wage.* yscale.*Y_matrix;
    C_current = C_guess;


    % solve for policy functions with EGP
    % this part is almost same as that in basic model,
    % except that "wage.* yscale.*" before "Y_matrix".

    iteration_counter = 0;        % iteration counting 
    iteration_diff = 100;           % initial difference 
    while iteration_counter <= iteration_max && iteration_diff > iteration_tolerance

        iteration_counter = iteration_counter + 1;
  
        emuc = u1(C_current)*y_distribution;   % expected marginal utility of consumption
        muc1 = beta.*(1+r).*emuc; % new marginal utility from Euler equation
        C_endo = u1_inverse(muc1); % endogenous consumption from marginal utility   

        for i_y = 1:y_grid_size         
        % loop over different y
            A_endo(:,i_y) = (C_endo + A_matrix(:,i_y) - wage.* yscale.* Y_matrix(:,i_y))./(1+r);  
            % endogenous asset from budget constraint 

            A_next(:,i_y) = interp1(A_endo(:,i_y), A_matrix(:,i_y), A_matrix(:,i_y));
            % next asset from interpolation 
        end
    
        A_next = max(A_next, borrow_limit);  % borrowing constraint    
        C_next = (1 + r) .* A_matrix + wage.* yscale.* Y_matrix - A_next; % next consumption from budget constraint

        iteration_diff = max(max(abs(C_current - C_next)));% update new difference
        C_current = C_next; % update current consumption

        % disp(['Iteration no. ' int2str(iteration_counter), ' max con fn diff is ' num2str(iteration_diff)]);
    end                 


    %simulate: start at assets from last interation
    A_simulation(:,1) = A_simulation(:,simulation_t_size);
    
    %create interpolating function
    for i_y = 1:y_grid_size
        savinterp{i_y} = griddedInterpolant(a_grid,A_next(:,i_y),'linear');
    end
    
    %loop over time periods
    for i_t = 1:simulation_t_size        
        % asset choice
        if i_t<simulation_t_size
            for i_y = 1:y_grid_size
                A_simulation(Y_simulation_index(:,i_t)==i_y,i_t+1) = savinterp{i_y}(A_simulation(Y_simulation_index(:,i_t)==i_y,i_t));
            end
        end
    end
    
    %assign actual labor income values;
    labincsim = wage.*yscale.*Y_simulation;

    % mean assets and efficiency units
    Ea  = mean(A_simulation(:,simulation_t_size));
    L   = yscale.*mean(Y_simulation(:,simulation_t_size));
    
    KLrationew = Ea./ L;
    
    iteration_diff_KL = KLrationew./KLratio - 1;
    disp(['Equm iter ' int2str(iteration_counter_KL), ', r  = ',num2str(r), ', KL ratio: ',num2str(KLrationew),' KL diff: ' num2str(iteration_diff_KL*100) '%']);
    
    KLratio = (1-step_KL)*KLratio + step_KL*KLrationew; 
end
Equm iter 1, r  = 0.051632, KL ratio: 3.5309 KL diff: -29.8917%
Equm iter 2, r  = 0.051768, KL ratio: 4.0401 KL diff: -19.6614%
Equm iter 3, r  = 0.051857, KL ratio: 4.5026 KL diff: -10.3761%
Equm iter 4, r  = 0.051905, KL ratio: 4.871 KL diff: -2.9935%
Equm iter 5, r  = 0.051918, KL ratio: 5.1041 KL diff: 1.6649%
Equm iter 6, r  = 0.051911, KL ratio: 5.2025 KL diff: 3.6154%
Equm iter 7, r  = 0.051894, KL ratio: 5.2034 KL diff: 3.6154%
Equm iter 8, r  = 0.051878, KL ratio: 5.1555 KL diff: 2.6434%
Equm iter 9, r  = 0.051866, KL ratio: 5.0972 KL diff: 1.4694%
Equm iter 10, r  = 0.051859, KL ratio: 5.0498 KL diff: 0.51677%
Equm iter 11, r  = 0.051857, KL ratio: 5.0201 KL diff: -0.077136%
Equm iter 12, r  = 0.051857, KL ratio: 5.0067 KL diff: -0.34339%
Equm iter 13, r  = 0.051859, KL ratio: 5.0046 KL diff: -0.38225%
Equm iter 14, r  = 0.05186, KL ratio: 5.0086 KL diff: -0.30064%
Equm iter 15, r  = 0.051862, KL ratio: 5.0145 KL diff: -0.18152%
Equm iter 16, r  = 0.051862, KL ratio: 5.0198 KL diff: -0.075194%
Equm iter 17, r  = 0.051863, KL ratio: 5.0234 KL diff: -0.0030061%
Equm iter 18, r  = 0.051863, KL ratio: 5.0253 KL diff: 0.033456%
Equm iter 19, r  = 0.051863, KL ratio: 5.0257 KL diff: 0.042767%
Equm iter 20, r  = 0.051862, KL ratio: 5.0254 KL diff: 0.036261%
Equm iter 21, r  = 0.051862, KL ratio: 5.0248 KL diff: 0.023653%
Equm iter 22, r  = 0.051862, KL ratio: 5.0242 KL diff: 0.011321%
Equm iter 23, r  = 0.051862, KL ratio: 5.0237 KL diff: 0.0023308%
Equm iter 24, r  = 0.051862, KL ratio: 5.0235 KL diff: -0.0026813%
Equm iter 25, r  = 0.051862, KL ratio: 5.0234 KL diff: -0.0044368%
Equm iter 26, r  = 0.051862, KL ratio: 5.0234 KL diff: -0.0041377%
Equm iter 27, r  = 0.051862, KL ratio: 5.0235 KL diff: -0.002909%
Equm iter 28, r  = 0.051862, KL ratio: 5.0235 KL diff: -0.001545%
Equm iter 29, r  = 0.051862, KL ratio: 5.0236 KL diff: -0.00047084%

Graph#

    figure(1);
    
    % consumption policy function
    subplot(2,4,1);
    plot(a_grid,C_next(:,1),'b-',a_grid,C_next(:,y_grid_size),'r-','LineWidth',1);
    grid;
    xlim([0 a_max]);
    title('Consumption Policy Function');
    legend('Lowest income state','Highest income state');

    % savings policy function
    subplot(2,4,2);
    plot(a_grid,A_next(:,1)-a_grid,'b-',a_grid,A_next(:,y_grid_size)-a_grid,'r-','LineWidth',1);
    hold on;
    plot(a_grid,zeros(a_grid_size,1),'k','LineWidth',0.5);
    hold off;
    grid;
    xlim([0 a_max]);
    title('Savings Policy Function (a''-a)');
    
    % consumption policy function: zoomed in
    subplot(2,4,3);
    plot(a_grid,C_next(:,1),'b-o',a_grid,C_next(:,y_grid_size),'r-o','LineWidth',2);
    grid;
    xlim([0 1]);
    title('Consumption: Zoomed');
    
     % savings policy function: zoomed in
    subplot(2,4,4);
    plot(a_grid,A_next(:,1)-a_grid,'b-o',a_grid,A_next(:,y_grid_size)-a_grid,'r-o','LineWidth',2);
    hold on;
    plot(a_grid,zeros(a_grid_size,1),'k','LineWidth',0.5);
    hold off;
    grid;
    xlim([0 1]);
    title('Savings: Zoomed (a''-a)');
    
    
    %income distribution
    subplot(2,4,5);
    hist(Y_simulation(:,simulation_t_size),y_grid);
    h = findobj(gca,'Type','patch');
    set(h,'FaceColor',[0 0.5 0.5],'EdgeColor','blue','LineStyle','-');
    ylabel('')
    title('Income distribution');
    
    %asset distribution
    subplot(2,4,6:7);
    hist(A_simulation(:,simulation_t_size),100);
    h = findobj(gca,'Type','patch');
    set(h,'FaceColor',[.7 .7 .7],'EdgeColor','black','LineStyle','-');
    ylabel('')
    title('Asset distribution');

    %convergence check
    subplot(2,4,8);
    plot([1:simulation_t_size]',mean(A_simulation,1),'k-','LineWidth',1.5);
    ylim([0 2*Ea]);
    ylabel('Time Period');
    title('Mean Asset Convergence');
    
    
   % asset distribution statistics
    aysim = A_simulation(:,simulation_t_size) ./ mean(Y_simulation(:,simulation_t_size));
    disp(['Mean assets: ' num2str(mean(aysim))]);
    disp(['Fraction borrowing constrained: ' num2str(sum(aysim==borrow_limit)./simulation_n_size * 100) '%']);
    disp(['10th Percentile: ' num2str(quantile(aysim,.1))]);
    disp(['50th Percentile: ' num2str(quantile(aysim,.5))]);
    disp(['90th Percentile: ' num2str(quantile(aysim,.9))]);
    disp(['99th Percentile: ' num2str(quantile(aysim,.99))]);
_images/dd68445d8d85c5696fcd5c0c2e5154def9b82653815c2e4ea5ae2c8b2d4decb9.png
Mean assets: 2.634
Fraction borrowing constrained: 0.038%
10th Percentile: 0.68697
50th Percentile: 1.9261
90th Percentile: 5.0767
99th Percentile: 13.5927