Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
matlab-gui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dóra Kocsis
matlab-gui
Commits
b732a77f
Verified
Commit
b732a77f
authored
6 years ago
by
Houtan Bastani
Browse files
Options
Downloads
Patches
Plain Diff
clean up file
parent
4a85ce57
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/gui_estimation.m
+36
-43
36 additions, 43 deletions
src/gui_estimation.m
with
36 additions
and
43 deletions
src/gui_estimation.m
+
36
−
43
View file @
b732a77f
...
...
@@ -38,7 +38,7 @@ gui_size = gui_tools.get_gui_elements_size(tabId);
do_not_check_all_results
=
0
;
%
--- PANELS -------------------------------------
%
Panels
handles
.
uipanelResults
=
uipanel
(
...
'Parent'
,
tabId
,
...
'Tag'
,
'uipanelVars'
,
'BackgroundColor'
,
special_color
,
...
...
...
@@ -62,7 +62,7 @@ handles.uipanelComm = uipanel( ...
'Units'
,
'normalized'
,
'Position'
,
[
0.01
0.09
0.98
0.09
],
...
'Title'
,
'Current command options:'
);
%
--- STATIC TEXT -------------------------------------
%
Text
uicontrol
(
...
'Parent'
,
tabId
,
'Tag'
,
'text7'
,
...
'Style'
,
'text'
,
'BackgroundColor'
,
bg_color
,
...
...
...
@@ -79,7 +79,6 @@ uicontrol( ...
'String'
,
'Select endogenous variables that will be used in estimation:'
,
...
'HorizontalAlignment'
,
'left'
);
if
~
isfield
(
model_settings
,
'estimation'
)
model_settings
.
estimation
=
struct
();
end
...
...
@@ -102,8 +101,7 @@ handles.estimation = uicontrol( ...
'TooltipString'
,
comm_str
,
...
'HorizontalAlignment'
,
'left'
);
% --- PUSHBUTTONS -------------------------------------
% Buttons
handles
.
pushbuttonEstimation
=
uicontrol
(
...
'Parent'
,
tabId
,
...
'Tag'
,
'pushbuttonSimulation'
,
...
...
...
@@ -157,7 +155,6 @@ handles.pushbuttonCommandDefinition = uicontrol( ...
function
uipanelResults_CreateFcn
()
results
=
dynare_gui_
.
est_results
;
names
=
fieldnames
(
results
);
num_groups
=
size
(
names
,
1
);
current_result
=
1
;
...
...
@@ -186,10 +183,13 @@ handles.pushbuttonCommandDefinition = uicontrol( ...
% Create slider
if
numTabResults
>
maxDisplayed
sld
=
uicontrol
(
'Style'
,
'slider'
,
...
uicontrol
(
'Style'
,
'slider'
,
...
'Parent'
,
tabs_panel
,
...
'Min'
,
0
,
'Max'
,
numTabResults
-
maxDisplayed
,
'Value'
,
numTabResults
-
maxDisplayed
,
...
'Units'
,
'normalized'
,
'Position'
,[
0.968
0
.
03
1
],
...
'Min'
,
0
,
...
'Max'
,
numTabResults
-
maxDisplayed
,
...
'Value'
,
numTabResults
-
maxDisplayed
,
...
'Units'
,
'normalized'
,
...
'Position'
,
[
0.968
0
.
03
1
],
...
'Callback'
,
{
@
scrollPanel_Callback
,
num
,
numTabResults
});
end
...
...
@@ -214,18 +214,17 @@ handles.pushbuttonCommandDefinition = uicontrol( ...
handles
.
num_results
=
current_result
-
1
;
function
checkbox_Callback
(
hObject
,
callbackdata
,
comm_option
)
function
checkbox_Callback
(
hObject
,
~
,
comm_option
)
if
isempty
(
comm_option
)
return
end
value
=
get
(
hObject
,
'Value'
);
num_options
=
size
(
comm_option
,
2
);
if
isfield
(
model_settings
,
'estimation'
)
user_options
=
model_settings
.
estimation
;
else
user_options
=
struct
();
end
if
v
alue
if
hObject
.
V
alue
for
i
=
1
:
num_options
option_value
=
comm_option
(
i
)
.
option
;
indx
=
findstr
(
comm_option
(
i
)
.
option
,
'.'
);
...
...
@@ -267,9 +266,8 @@ handles.pushbuttonCommandDefinition = uicontrol( ...
model_settings
.
estimation
=
user_options
;
comm_str
=
gui_tools
.
command_string
(
'estimation'
,
user_options
);
set
(
handles
.
estimation
,
'String'
,
comm_str
);
set
(
handles
.
estimation
,
'TooltipString'
,
comm_str
);
handles
.
estimation
.
String
=
comm_str
;
handles
.
estimation
.
TooltipString
=
comm_str
;
if
~
do_not_check_all_results
check_all_result_option
();
...
...
@@ -284,13 +282,13 @@ handles.pushbuttonCommandDefinition = uicontrol( ...
end
function
scrollPanel_Callback
(
hObject
,
~
,
tab_index
,
num_results
)
move
=
num_results
-
maxDisplayed
-
floor
(
get
(
hObject
,
'
Value
'
)
);
move
=
num_results
-
maxDisplayed
-
floor
(
hObject
.
Value
);
for
iiii
=
1
:
num_results
if
iiii
<=
move
||
iiii
>
move
+
maxDisplayed
set
(
handles
.
tab_results
(
tab_index
,
iiii
)
,
'
Visible
'
,
'off'
)
;
handles
.
tab_results
(
tab_index
,
iiii
)
.
Visible
=
'off'
;
else
set
(
handles
.
tab_results
(
tab_index
,
iiii
)
,
'
Visible
'
,
'on'
)
;
set
(
handles
.
tab_results
(
tab_index
,
iiii
)
,
'
Position
'
,
[
3
top_position
-
(
iiii
-
move
)
*
2
60
2
]
)
;
handles
.
tab_results
(
tab_index
,
iiii
)
.
Visible
=
'on'
;
handles
.
tab_results
(
tab_index
,
iiii
)
.
Position
=
[
3
top_position
-
(
iiii
-
move
)
*
2
60
2
];
end
end
end
...
...
@@ -337,7 +335,7 @@ handles.pushbuttonCommandDefinition = uicontrol( ...
end
jj
=
jj
+
1
;
end
set
(
handles
.
tab_results
(
num
,
ii
)
,
'
Value
'
,
selected
)
;
handles
.
tab_results
(
num
,
ii
)
.
Value
=
selected
;
ii
=
ii
+
1
;
end
end
...
...
@@ -345,11 +343,6 @@ handles.pushbuttonCommandDefinition = uicontrol( ...
end
function
pushbuttonEstimation_Callback
(
hObject
,
~
)
if
~
any
([
handles
.
endoTable
.
Data
{:,
1
}])
gui_tools
.
show_warning
(
'Please select variables'
);
uicontrol
(
hObject
);
return
end
handles
.
pushbuttonResults
.
Enable
=
'off'
;
old_options
=
options_
;
old_oo
=
oo_
;
...
...
@@ -394,12 +387,12 @@ handles.pushbuttonCommandDefinition = uicontrol( ...
function
pushbuttonReset_Callback
(
~
,
~
)
handles
.
endoTable
.
Data
(:,
1
)
=
{
false
};
for
ii
=
1
:
handles
.
num_results
set
(
handles
.
results
(
ii
)
,
'
Value
'
,
0
)
;
handles
.
results
(
ii
)
.
Value
=
0
;
end
model_settings
.
estimation
=
struct
();
comm_str
=
gui_tools
.
command_string
(
'estimation'
,
model_settings
.
estimation
);
set
(
handles
.
estimation
,
'
String
'
,
comm_str
)
;
set
(
handles
.
estimation
,
'
TooltipString
'
,
comm_str
)
;
handles
.
estimation
.
String
=
comm_str
;
handles
.
estimation
.
TooltipString
=
comm_str
;
end
function
pushbuttonCommandDefinition_Callback
(
~
,
~
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment