Skip to content
Snippets Groups Projects
Commit b02e7a74 authored by Dóra Kocsis's avatar Dóra Kocsis
Browse files

fix bug in mapping nested options in set_command_option

In case of nested options (eg: estimation.moments_posterior_density.indicator) the syntax: options_.(gui_auxiliary.command_option_mapping(name)) failed to populate the options_ field.
parent 09bd6e85
No related branches found
No related tags found
1 merge request!15Master
......@@ -108,14 +108,19 @@ try
elseif value == 4
options_.(gui_auxiliary.command_option_mapping(name)) = 'FILENAME';
end
case 'mcmc_jumping_covariance_file'
if ~isempty(value) && strcmp(options_.MCMC_jumping_covariance, 'FILENAME')
options_.MCMC_jumping_covariance = strrep(value, '.mat', '');
end
otherwise
options_.(gui_auxiliary.command_option_mapping(name)) = value;
if isnumeric(value)
eval(['options_.' gui_auxiliary.command_option_mapping(name) '=' num2str(value) ';']);
else
eval_expr = sprintf("options_.%s='%s';", gui_auxiliary.command_option_mapping(name), value);
eval(eval_expr);
end
end
catch
status = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment