time | Calls | line |
---|
| | 7 | function result_map = ff_iwkz_vf(varargin)
|
| | 8 | %% FF_IWKZ_VF solve infinite horizon exo shock + endo asset problem
|
| | 9 | % This program solves the infinite horizon dynamic savings and risky
|
| | 10 | % capital asset problem with some ar1 shock. This is the two step solution
|
| | 11 | % with interpolation version of
|
| | 12 | % <https://fanwangecon.github.io/CodeDynaAsset/m_akz/solve/html/ff_wkz_vf.html
|
| | 13 | % ff_wkz_vf>, which solves the problem in two steps without interpolation. See
|
| | 14 | % <https://fanwangecon.github.io/CodeDynaAsset/m_akz/solve/html/ff_wkz_evf.html
|
| | 15 | % ff_wkz_evf> for details about the second stage.
|
| | 16 | %
|
| | 17 | % @param param_map container parameter container
|
| | 18 | %
|
| | 19 | % @param support_map container support container
|
| | 20 | %
|
| | 21 | % @param armt_map container container with states, choices and shocks
|
| | 22 | % grids that are inputs for grid based solution algorithm
|
| | 23 | %
|
| | 24 | % @param func_map container container with function handles for
|
| | 25 | % consumption cash-on-hand etc.
|
| | 26 | %
|
| | 27 | % @return result_map container contains policy function matrix, value
|
| | 28 | % function matrix, iteration results, and policy function, value function
|
| | 29 | % and iteration results tables.
|
| | 30 | %
|
| | 31 | % keys included in result_map:
|
| | 32 | %
|
| | 33 | % * mt_val matrix states_n by shock_n matrix of converged value function grid
|
| | 34 | % * mt_pol_a matrix states_n by shock_n matrix of converged policy function grid
|
| | 35 | % * ar_val_diff_norm array if bl_post = true it_iter_last by 1 val function
|
| | 36 | % difference between iteration
|
| | 37 | % * ar_pol_diff_norm array if bl_post = true it_iter_last by 1 policy
|
| | 38 | % function difference between iterations
|
| | 39 | % * mt_pol_perc_change matrix if bl_post = true it_iter_last by shock_n the
|
| | 40 | % proportion of grid points at which policy function changed between
|
| | 41 | % current and last iteration for each element of shock
|
| | 42 | %
|
| | 43 | % @example
|
| | 44 | %
|
| | 45 | % @include
|
| | 46 | %
|
| | 47 | % * <https://fanwangecon.github.io/CodeDynaAsset/m_akz/paramfunc/ff_wkz_evf.m ff_wkz_evf>
|
| | 48 | % * <https://fanwangecon.github.io/CodeDynaAsset/m_akz/paramfunc/ffs_akz_set_default_param.m ffs_akz_set_default_param>
|
| | 49 | % * <https://fanwangecon.github.io/CodeDynaAsset/m_akz/paramfunc/ffs_akz_get_funcgrid.m ffs_akz_get_funcgrid>
|
| | 50 | % * <https://fanwangecon.github.io/CodeDynaAsset/m_akz/solvepost/ff_akz_vf_post.m ff_akz_vf_post>
|
| | 51 | %
|
| | 52 | % @seealso
|
| | 53 | %
|
| | 54 | % * concurrent (safe + risky) loop: <https://fanwangecon.github.io/CodeDynaAsset/m_akz/solve/html/ff_akz_vf.html ff_akz_vf>
|
| | 55 | % * concurrent (safe + risky) vectorized: <https://fanwangecon.github.io/CodeDynaAsset/m_akz/solve/html/ff_akz_vf_vec.html ff_akz_vf_vec>
|
| | 56 | % * concurrent (safe + risky) optimized-vectorized: <https://fanwangecon.github.io/CodeDynaAsset/m_akz/solve/html/ff_akz_vf_vecsv.html ff_akz_vf_vecsv>
|
| | 57 | % * two-stage (safe + risky) loop: <https://fanwangecon.github.io/CodeDynaAsset/m_akz/solve/html/ff_wkz_vf.html ff_wkz_vf>
|
| | 58 | % * two-stage (safe + risky) vectorized: <https://fanwangecon.github.io/CodeDynaAsset/m_akz/solve/html/ff_wkz_vf_vec.html ff_wkz_vf_vec>
|
| | 59 | % * two-stage (safe + risky) optimized-vectorized: <https://fanwangecon.github.io/CodeDynaAsset/m_akz/solve/html/ff_wkz_vf_vecsv.html ff_wkz_vf_vecsv>
|
| | 60 | % * two-stage + interpolate (safe + risky) loop: <https://fanwangecon.github.io/CodeDynaAsset/m_akz/solve/html/ff_iwkz_vf.html ff_iwkz_vf>
|
| | 61 | % * two-stage + interpolate (safe + risky) vectorized: <https://fanwangecon.github.io/CodeDynaAsset/m_akz/solve/html/ff_iwkz_vf_vec.html ff_iwkz_vf_vec>
|
| | 62 | % * two-stage + interpolate (safe + risky) optimized-vectorized: <https://fanwangecon.github.io/CodeDynaAsset/m_akz/solve/html/ff_iwkz_vf_vecsv.html ff_iwkz_vf_vecsv>
|
| | 63 | %
|
| | 64 |
|
| | 65 |
|
| | 66 | %% Default
|
| | 67 | % * it_param_set = 1: quick test
|
| | 68 | % * it_param_set = 2: benchmark run
|
| | 69 | % * it_param_set = 3: benchmark profile
|
| | 70 | % * it_param_set = 4: press publish button
|
| | 71 |
|
| | 72 | it_param_set = 2;
|
| | 73 | bl_input_override = true;
|
| | 74 | [param_map, support_map] = ffs_akz_set_default_param(it_param_set);
|
| | 75 |
|
| | 76 | % Note: param_map and support_map can be adjusted here or outside to override defaults
|
| | 77 | % param_map('it_w_n') = 50;
|
| | 78 | % param_map('it_ak_n') = param_map('it_w_n');
|
| | 79 | % param_map('it_z_n') = 15;
|
| | 80 | % param_map('fl_coh_interp_grid_gap') = 0.1;
|
| | 81 | % param_map('it_c_interp_grid_gap') = 10^-4;
|
| | 82 |
|
| | 83 | % get armt and func map
|
| | 84 | [armt_map, func_map] = ffs_akz_get_funcgrid(param_map, support_map, bl_input_override); % 1 for override
|
| | 85 | default_params = {param_map support_map armt_map func_map};
|
| | 86 |
|
| | 87 | %% Parse Parameters 1
|
| | 88 |
|
| | 89 | % if varargin only has param_map and support_map,
|
| | 90 | params_len = length(varargin);
|
| | 91 | [default_params{1:params_len}] = varargin{:};
|
| | 92 | param_map = [param_map; default_params{1}];
|
| | 93 | support_map = [support_map; default_params{2}];
|
| | 94 | if params_len >= 1 && params_len <= 2
|
| | 95 | % If override param_map, re-generate armt and func if they are not
|
| | 96 | % provided
|
| | 97 | bl_input_override = true;
|
| | 98 | [armt_map, func_map] = ffs_akz_get_funcgrid(param_map, support_map, bl_input_override);
|
| | 99 | else
|
| | 100 | % Override all
|
| | 101 | armt_map = [armt_map; default_params{3}];
|
| | 102 | func_map = [func_map; default_params{4}];
|
| | 103 | end
|
| | 104 |
|
| | 105 | % append function name
|
| | 106 | st_func_name = 'ff_iwkz_vf';
|
| | 107 | support_map('st_profile_name_main') = [st_func_name support_map('st_profile_name_main')];
|
| | 108 | support_map('st_mat_name_main') = [st_func_name support_map('st_mat_name_main')];
|
| | 109 | support_map('st_img_name_main') = [st_func_name support_map('st_img_name_main')];
|
| | 110 |
|
| | 111 | %% Parse Parameters 2
|
| | 112 |
|
| | 113 | % armt_map
|
| | 114 | params_group = values(armt_map, {'ar_w', 'ar_z'});
|
| | 115 | [ar_w, ar_z] = params_group{:};
|
| | 116 | params_group = values(armt_map, {'ar_interp_c_grid', 'ar_interp_coh_grid', ...
|
| | 117 | 'mt_interp_coh_grid_mesh_z', 'mt_z_mesh_coh_interp_grid'});
|
| | 118 | [ar_interp_c_grid, ar_interp_coh_grid, ...
|
| | 119 | mt_interp_coh_grid_mesh_z, mt_z_mesh_coh_interp_grid] = params_group{:};
|
| | 120 | params_group = values(armt_map, {'mt_coh_wkb', 'mt_z_mesh_coh_wkb'});
|
| | 121 | [mt_coh_wkb, mt_z_mesh_coh_wkb] = params_group{:};
|
| | 122 |
|
| | 123 | % func_map
|
| | 124 | params_group = values(func_map, {'f_util_log', 'f_util_crra', 'f_cons'});
|
| | 125 | [f_util_log, f_util_crra, f_cons] = params_group{:};
|
| | 126 |
|
| | 127 | % param_map
|
| | 128 | params_group = values(param_map, {'fl_r_save', 'fl_r_borr', 'fl_w',...
|
| | 129 | 'it_z_n', 'fl_crra', 'fl_beta', 'fl_c_min'});
|
| | 130 | [fl_r_save, fl_r_borr, fl_wage, it_z_n, fl_crra, fl_beta, fl_c_min] = params_group{:};
|
| | 131 | params_group = values(param_map, {'it_maxiter_val', 'fl_tol_val', 'fl_tol_pol', 'it_tol_pol_nochange'});
|
| | 132 | [it_maxiter_val, fl_tol_val, fl_tol_pol, it_tol_pol_nochange] = params_group{:};
|
| | 133 |
|
| | 134 | % support_map
|
| | 135 | params_group = values(support_map, {'bl_profile', 'st_profile_path', ...
|
| | 136 | 'st_profile_prefix', 'st_profile_name_main', 'st_profile_suffix',...
|
| | 137 | 'bl_time', 'bl_display', 'it_display_every', 'bl_post'});
|
| | 138 | [bl_profile, st_profile_path, ...
|
| | 139 | st_profile_prefix, st_profile_name_main, st_profile_suffix, ...
|
| | 140 | bl_time, bl_display, it_display_every, bl_post] = params_group{:};
|
| | 141 |
|
| | 142 | %% Initialize Output Matrixes
|
| | 143 |
|
| | 144 | mt_val_cur = zeros(length(ar_interp_coh_grid),length(ar_z));
|
| | 145 | mt_val = mt_val_cur - 1;
|
| | 146 | mt_pol_a = zeros(length(ar_interp_coh_grid),length(ar_z));
|
| | 147 | mt_pol_a_cur = mt_pol_a - 1;
|
| | 148 | mt_pol_k = zeros(length(ar_interp_coh_grid),length(ar_z));
|
| | 149 | mt_pol_k_cur = mt_pol_k - 1;
|
| | 150 |
|
| | 151 | %% Initialize Convergence Conditions
|
| | 152 |
|
| | 153 | bl_vfi_continue = true;
|
| | 154 | it_iter = 0;
|
| | 155 | ar_val_diff_norm = zeros([it_maxiter_val, 1]);
|
| | 156 | ar_pol_diff_norm = zeros([it_maxiter_val, 1]);
|
| | 157 | mt_pol_perc_change = zeros([it_maxiter_val, it_z_n]);
|
| | 158 |
|
| | 159 | %% Pre-calculate u(c)
|
| | 160 | % Interpolation, see
|
| | 161 | % <https://fanwangecon.github.io/M4Econ/support/speed/partupdate/fs_u_c_partrepeat_main.html
|
| | 162 | % fs_u_c_partrepeat_main> for why interpolate over u(c)
|
| | 163 |
|
| | 164 | % Evaluate
|
| | 165 | if (fl_crra == 1)
|
| | 166 | ar_interp_u_of_c_grid = f_util_log(ar_interp_c_grid);
|
| | 167 | fl_u_neg_c = f_util_log(fl_c_min);
|
| | 168 | else
|
| | 169 | ar_interp_u_of_c_grid = f_util_crra(ar_interp_c_grid);
|
| | 170 | fl_u_neg_c = f_util_crra(fl_c_min);
|
| | 171 | end
|
| | 172 | ar_interp_u_of_c_grid(ar_interp_c_grid <= fl_c_min) = fl_u_neg_c;
|
| | 173 |
|
| | 174 | % Get Interpolant
|
| | 175 | f_grid_interpolant_spln = griddedInterpolant(ar_interp_c_grid, ar_interp_u_of_c_grid, 'spline');
|
| | 176 |
|
| | 177 | %% Iterate Value Function
|
| | 178 | % Loop solution with 4 nested loops
|
| | 179 | %
|
| | 180 | % # loop 1: over exogenous states
|
| | 181 | % # loop 2: over endogenous states
|
| | 182 | % # loop 3: over choices
|
| | 183 | % # loop 4: add future utility, integration--loop over future shocks
|
| | 184 | %
|
| | 185 |
|
| | 186 | % Start Profile
|
| | 187 | if (bl_profile)
|
| | 188 | close all;
|
| | 189 | profile off;
|
| | 190 | profile on;
|
< 0.001 | 1 | 191 | end
|
| | 192 |
|
| | 193 | % Start Timer
|
< 0.001 | 1 | 194 | if (bl_time)
|
< 0.001 | 1 | 195 | tic;
|
< 0.001 | 1 | 196 | end
|
| | 197 |
|
| | 198 | % Value Function Iteration
|
< 0.001 | 1 | 199 | while bl_vfi_continue
|
< 0.001 | 111 | 200 | it_iter = it_iter + 1;
|
| | 201 |
|
| | 202 | %% Interpolate (1) reacahble v(coh(k(w,z),b(w,z),z),z) given v(coh, z)
|
| | 203 | % v(coh,z) solved on ar_interp_coh_grid, ar_z grids, see
|
| | 204 | % ffs_iwkz_get_funcgrid.m. Generate interpolant based on that, Then
|
| | 205 | % interpolate for the coh reachable levels given the k(w,z) percentage
|
| | 206 | % choice grids in the second stage of the problem
|
| | 207 |
|
| | 208 | % Generate Interpolant for v(coh,z)
|
0.060 | 111 | 209 | f_grid_interpolant_value = griddedInterpolant(...
|
| 111 | 210 | mt_z_mesh_coh_interp_grid', mt_interp_coh_grid_mesh_z', mt_val_cur', 'linear');
|
| | 211 |
|
| | 212 | % Interpoalte for v(coh(k(w,z),b(w,z),z),z)
|
0.079 | 111 | 213 | mt_val_wkb_interpolated = f_grid_interpolant_value(mt_z_mesh_coh_wkb, mt_coh_wkb);
|
| | 214 |
|
| | 215 | %% Solve Second Stage Problem k*(w,z)
|
| | 216 | % This is the key difference between this function and
|
| | 217 | % <https://fanwangecon.github.io/CodeDynaAsset/m_akz/paramfunc/html/ffs_akz_set_functions.html
|
| | 218 | % ffs_akz_set_functions> which solves the two stages jointly
|
| | 219 | % Interpolation first, because solution coh grid is not the same as all
|
| | 220 | % points reachable by k and b choices given w.
|
| | 221 |
|
< 0.001 | 111 | 222 | bl_input_override = true;
|
0.137 | 111 | 223 | [mt_ev_condi_z_max, ~, mt_ev_condi_z_max_kp, mt_ev_condi_z_max_bp] = ...
|
| 111 | 224 | ff_wkz_evf(mt_val_wkb_interpolated, param_map, support_map, armt_map, bl_input_override);
|
| | 225 |
|
| | 226 | %% Solve First Stage Problem w*(z) given k*(w,z)
|
| | 227 | % loop 1: over exogenous states
|
< 0.001 | 111 | 228 | for it_z_i = 1:length(ar_z)
|
| | 229 |
|
| | 230 | % Get 2nd Stage Arrays
|
0.002 | 1665 | 231 | ar_ev_condi_z_max_z = mt_ev_condi_z_max(:, it_z_i);
|
0.001 | 1665 | 232 | ar_w_kstar_z = mt_ev_condi_z_max_kp(:, it_z_i);
|
0.001 | 1665 | 233 | ar_w_astar_z = mt_ev_condi_z_max_bp(:, it_z_i);
|
| | 234 |
|
| | 235 | % loop 2: over endogenous states
|
< 0.001 | 1665 | 236 | for it_coh_interp_j = 1:length(ar_interp_coh_grid)
|
| | 237 | % Get cash-on-hand which include k,b,z
|
0.055 | 945720 | 238 | fl_coh = mt_interp_coh_grid_mesh_z(it_coh_interp_j, it_z_i);
|
| | 239 |
|
| | 240 | % loop 3: over choices, only w vector
|
| | 241 | % we choose w(z), know from ff_wkz_evf k*(w,z), b*=w-k*
|
0.908 | 945720 | 242 | ar_val_cur = zeros(size(ar_w));
|
0.050 | 945720 | 243 | for it_cohp_k = 1:length(ar_w)
|
1.879 | 47286000 | 244 | fl_w_kstar_z = ar_w_kstar_z(it_cohp_k);
|
1.909 | 47286000 | 245 | fl_w_astar_z = ar_w_astar_z(it_cohp_k);
|
| | 246 |
|
| | 247 | % consumption
|
111.720 | 47286000 | 248 | fl_c = f_cons(fl_coh, fl_w_astar_z, fl_w_kstar_z);
|
| | 249 |
|
| | 250 | % loop 4: add future utility, integration already done in
|
| | 251 | % ff_wkz_evf
|
2.233 | 47286000 | 252 | fl_ev_condi_z_max_z = ar_ev_condi_z_max_z(it_cohp_k);
|
| | 253 |
|
| | 254 | % Interpolate (2)
|
455.118 | 47286000 | 255 | ar_val_cur(it_cohp_k) = f_grid_interpolant_spln(fl_c) + fl_beta*fl_ev_condi_z_max_z;
|
| | 256 |
|
| | 257 | % Replace if negative consumption
|
2.179 | 47286000 | 258 | if fl_c <= 0
|
0.704 | 20442870 | 259 | ar_val_cur(it_cohp_k) = fl_u_neg_c;
|
0.914 | 20442870 | 260 | end
|
| | 261 |
|
1.928 | 47286000 | 262 | end
|
| | 263 |
|
| | 264 | % maximization over loop 3 choices for loop 1+2 states
|
1.293 | 945720 | 265 | it_max_lin_idx = find(ar_val_cur == max(ar_val_cur));
|
0.060 | 945720 | 266 | mt_val(it_coh_interp_j,it_z_i) = ar_val_cur(it_max_lin_idx(1));
|
0.052 | 945720 | 267 | mt_pol_a(it_coh_interp_j,it_z_i) = ar_w_astar_z(it_max_lin_idx(1));
|
0.055 | 945720 | 268 | mt_pol_k(it_coh_interp_j,it_z_i) = ar_w_kstar_z(it_max_lin_idx(1));
|
| | 269 |
|
0.043 | 945720 | 270 | end
|
0.002 | 1665 | 271 | end
|
| | 272 |
|
| | 273 | %% Check Tolerance and Continuation
|
| | 274 |
|
| | 275 | % Difference across iterations
|
0.093 | 111 | 276 | ar_val_diff_norm(it_iter) = norm(mt_val - mt_val_cur);
|
0.106 | 111 | 277 | ar_pol_diff_norm(it_iter) = norm(mt_pol_a - mt_pol_a_cur) + norm(mt_pol_k - mt_pol_k_cur);
|
0.009 | 111 | 278 | ar_pol_a_perc_change = sum((mt_pol_a ~= mt_pol_a_cur))/length(ar_interp_coh_grid);
|
0.006 | 111 | 279 | ar_pol_k_perc_change = sum((mt_pol_k ~= mt_pol_k_cur))/length(ar_interp_coh_grid);
|
0.017 | 111 | 280 | mt_pol_perc_change(it_iter, :) = mean([ar_pol_a_perc_change;ar_pol_k_perc_change]);
|
| | 281 |
|
| | 282 | % Update
|
0.011 | 111 | 283 | mt_val_cur = mt_val;
|
0.006 | 111 | 284 | mt_pol_a_cur = mt_pol_a;
|
0.006 | 111 | 285 | mt_pol_k_cur = mt_pol_k;
|
| | 286 |
|
| | 287 | % Print Iteration Results
|
< 0.001 | 111 | 288 | if (bl_display && (rem(it_iter, it_display_every)==0))
|
| | 289 | fprintf('VAL it_iter:%d, fl_diff:%d, fl_diff_pol:%d\n', ...
|
| | 290 | it_iter, ar_val_diff_norm(it_iter), ar_pol_diff_norm(it_iter));
|
| | 291 | tb_valpol_iter = array2table([mean(mt_val_cur,1);...
|
| | 292 | mean(mt_pol_a_cur,1); ...
|
| | 293 | mean(mt_pol_k_cur,1); ...
|
| | 294 | mt_val_cur(length(ar_interp_coh_grid),:); ...
|
| | 295 | mt_pol_a_cur(length(ar_interp_coh_grid),:); ...
|
| | 296 | mt_pol_k_cur(length(ar_interp_coh_grid),:)]);
|
| | 297 | tb_valpol_iter.Properties.VariableNames = strcat('z', string((1:size(mt_val_cur,2))));
|
| | 298 | tb_valpol_iter.Properties.RowNames = {'mval', 'map', 'mak', 'Hval', 'Hap', 'Hak'};
|
| | 299 | disp('mval = mean(mt_val_cur,1), average value over a')
|
| | 300 | disp('map = mean(mt_pol_a_cur,1), average choice over a')
|
| | 301 | disp('mkp = mean(mt_pol_k_cur,1), average choice over k')
|
| | 302 | disp('Hval = mt_val_cur(ar_interp_coh_grid,:), highest a state val')
|
| | 303 | disp('Hap = mt_pol_a_cur(ar_interp_coh_grid,:), highest a state choice')
|
| | 304 | disp('mak = mt_pol_k_cur(ar_interp_coh_grid,:), highest k state choice')
|
| | 305 | disp(tb_valpol_iter);
|
| | 306 | end
|
| | 307 |
|
| | 308 | % Continuation Conditions:
|
| | 309 | % 1. if value function convergence criteria reached
|
| | 310 | % 2. if policy function variation over iterations is less than
|
| | 311 | % threshold
|
< 0.001 | 111 | 312 | if (it_iter == (it_maxiter_val + 1))
|
< 0.001 | 1 | 313 | bl_vfi_continue = false;
|
0.002 | 110 | 314 | elseif ((it_iter == it_maxiter_val) || ...
|
| 110 | 315 | (ar_val_diff_norm(it_iter) < fl_tol_val) || ...
|
| 110 | 316 | (sum(ar_pol_diff_norm(max(1, it_iter-it_tol_pol_nochange):it_iter)) < fl_tol_pol))
|
| | 317 | % Fix to max, run again to save results if needed
|
< 0.001 | 1 | 318 | it_iter_last = it_iter;
|
< 0.001 | 1 | 319 | it_iter = it_maxiter_val;
|
< 0.001 | 1 | 320 | end
|
| | 321 |
|
< 0.001 | 111 | 322 | end
|
| | 323 |
|
| | 324 | % End Timer
|
< 0.001 | 1 | 325 | if (bl_time)
|
< 0.001 | 1 | 326 | toc;
|
< 0.001 | 1 | 327 | end
|
| | 328 |
|
| | 329 | % End Profile
|
< 0.001 | 1 | 330 | if (bl_profile)
|
0.012 | 1 | 331 | profile off
|
| | 332 | profile viewer
|
| | 333 | st_file_name = [st_profile_prefix st_profile_name_main st_profile_suffix];
|
| | 334 | profsave(profile('info'), strcat(st_profile_path, st_file_name));
|
| | 335 | end
|
| | 336 |
|
| | 337 | %% Process Optimal Choices
|
| | 338 |
|
| | 339 | result_map = containers.Map('KeyType','char', 'ValueType','any');
|
| | 340 | result_map('mt_val') = mt_val;
|
| | 341 |
|
| | 342 | result_map('cl_mt_pol_coh') = {mt_interp_coh_grid_mesh_z, zeros(1)};
|
| | 343 | result_map('cl_mt_pol_a') = {mt_pol_a, zeros(1)};
|
| | 344 | result_map('cl_mt_pol_k') = {mt_pol_k, zeros(1)};
|
| | 345 | result_map('cl_mt_pol_c') = {f_cons(mt_interp_coh_grid_mesh_z, mt_pol_a, mt_pol_k), zeros(1)};
|
| | 346 | result_map('ar_st_pol_names') = ["cl_mt_pol_coh", "cl_mt_pol_a", "cl_mt_pol_k", "cl_mt_pol_c"];
|
| | 347 |
|
| | 348 | if (bl_post)
|
| | 349 | bl_input_override = true;
|
| | 350 | result_map('ar_val_diff_norm') = ar_val_diff_norm(1:it_iter_last);
|
| | 351 | result_map('ar_pol_diff_norm') = ar_pol_diff_norm(1:it_iter_last);
|
| | 352 | result_map('mt_pol_perc_change') = mt_pol_perc_change(1:it_iter_last, :);
|
| | 353 |
|
| | 354 | % graphing based on coh_wkb, but that does not match optimal choice
|
| | 355 | % matrixes for graphs.
|
| | 356 | armt_map('mt_coh_wkb') = mt_interp_coh_grid_mesh_z;
|
| | 357 | armt_map('it_ameshk_n') = length(ar_interp_coh_grid);
|
| | 358 | armt_map('ar_a_meshk') = mt_interp_coh_grid_mesh_z(:,1);
|
| | 359 | armt_map('ar_k_mesha') = zeros(size(mt_interp_coh_grid_mesh_z(:,1)) + 0);
|
| | 360 |
|
| | 361 | result_map = ff_akz_vf_post(param_map, support_map, armt_map, func_map, result_map, bl_input_override);
|
| | 362 | end
|
| | 363 |
|
| | 364 | end
|
Other subfunctions in this file are not included in this listing.