Commit 75c998c2 authored by Dóra Kocsis's avatar Dóra Kocsis
Browse files

add nograph tick box in shock decomposition tabs, closes Dynare/matlab-gui#15

parent b2ef8d27
......@@ -269,6 +269,15 @@ handles.pushbuttonClose = uicontrol( ...
'Position', [spc*3+dwidth*1.5 top-num*dheight dwidth*2 dheight/2], ...
'String', {'qoq','yoy','aoa'}, ...
'Value', 1);
num = num+1.5;
handles.noGraph = uicontrol(...
'Parent', handles.uipanelResults, ...
'Style','checkbox',...
'Units', 'normalized', ...
'Position', [spc top-num*dheight 1-spc*4 dheight/2], ...
'String', 'Only compute shock decomposition, do not plot',...
'FontWeight', 'bold');
end
function pushbuttonShockDecomposition_Callback(hObject, ~)
......@@ -300,6 +309,8 @@ handles.pushbuttonClose = uicontrol( ...
options_.nodisplay = 0;
options_.plot_priors = 0;
options_.type = handles.type.String;
options_.no_graph.shock_decomposition = handles.noGraph.Value;
gui_tools.project_log_entry('Running shock decomposition','...');
[jObj, guiObj] = gui_tools.create_animated_screen('Running shock decomposition, please wait...', tabId);
var_list_ = handles.endoTable.Data([handles.endoTable.Data{:,1}], 2);
......@@ -394,6 +405,7 @@ handles.pushbuttonClose = uicontrol( ...
handles.lastPeriodYear.Value = handles.lastPeriodYearDefault;
handles.useShockGrouping.Value = 0;
handles.type.Value = 1;
handles.noGraph = 0;
end
function close_tab(~, ~, hTab)
......
......@@ -247,6 +247,15 @@ handles.pushbuttonClose = uicontrol( ...
'Position', [spc*3+dwidth*1.5 top-num*dheight dwidth*2 dheight/2], ...
'String', {'qoq','yoy','aoa'}, ...
'Value', 1);
num = num+1.5;
handles.noGraph = uicontrol(...
'Parent', handles.uipanelResults, ...
'Style','checkbox',...
'Units', 'normalized', ...
'Position', [spc top-num*dheight 1-spc*4 dheight/2], ...
'String', 'Only compute shock decomposition, do not plot',...
'FontWeight', 'bold');
end
function pushbuttonShockDecomposition_Callback(hObject, ~)
......@@ -305,6 +314,7 @@ handles.pushbuttonClose = uicontrol( ...
options_.model_settings.shocks = model_settings.shocks;
options_.shock_grouping = handles.useShockGrouping.Value;
options_.shock_decomp.init_state = handles.useInitState.Value;
options_.no_graph.shock_decomposition = handles.noGraph.Value;
oo_ = shock_decomposition(M_, oo_, options_, var_list_, bayestopt_, estim_params_);
end
jObj.stop;
......@@ -370,6 +380,7 @@ handles.pushbuttonClose = uicontrol( ...
handles.useShockGrouping.Value = 0;
handles.useInitState.Value = 0;
handles.type.Value = 1;
handles.noGraph = 0;
end
function close_tab(~, ~, hTab)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment