Skip to content

Commit

Permalink
added button in fig file and made the button clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
4gwe committed Sep 22, 2024
1 parent 7b09634 commit cccab37
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
Binary file modified src/pspm_review.fig
Binary file not shown.
30 changes: 26 additions & 4 deletions src/pspm_review.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function pspm_review_OpeningFcn(hObject, ~, handles, varargin)
set(handles.textPlot4,'HorizontalAlignment','left')
set(handles.textPlot5,'HorizontalAlignment','left')
set(handles.textPlot6,'HorizontalAlignment','left')
set(handles.textPlot7,'HorizontalAlignment','left')
set(handles.textStatus,'HorizontalAlignment','left')
set(handles.textStatus,'String','Select a model...');

Expand Down Expand Up @@ -303,13 +304,29 @@ function buttonPlot5_Callback(hObject, ~, handles)
set(handles.textStatus,'String',tmpStatusString);
guidata(hObject, handles);


% --- Executes on button press in buttonPlot6.
function buttonPlot6_Callback(hObject, ~, handles)
function buttonPlot6_Callback(hObject, eventdata, handles)
% hObject handle to buttonPlot6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
tmpStatusString = get(handles.textStatus,'String');
set(handles.textStatus,'String','Plotting is in progress. Please wait...');
switch handles.modelData{handles.currentModel}.modeltype
case 'glm'
disp('new button #6')

end



% --- Executes on button press in buttonPlot7.
function buttonPlot7_Callback(hObject, ~, handles)
% hObject handle to buttonPlot7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
tmpStatusString = get(handles.textStatus,'String');
set(handles.textStatus,'String','Plotting is in progress. Please wait...');
switch handles.modelData{handles.currentModel}.modeltype
case 'glm'
[~, handles.modelData{handles.currentModel}.fig] = ...
Expand Down Expand Up @@ -463,16 +480,18 @@ function showModel(handles)
'Plot', ...
'Plot', ...
'Show', ...
'Plot', ...
'Plot'};
textPlotString = {'Design matrix in SPM style', ...
'Orthogonality in SPM style', ...
'Predicted & observed', ...
'Regressors in command window', ...
'Reconstructed responses'};
'Reconstructed responses', ...
'Plot data per condition'};
% detect contrasts
if isfield(handles.modelData{handles.currentModel}.model, 'con')
buttonPlotString{6} = 'Show';
textPlotString{6} = 'Contrast names in command window';
buttonPlotString{7} = 'Show';
textPlotString{7} = 'Contrast names in command window';
end
setInvisble(handles);
setButtonPlotString(handles, buttonPlotString);
Expand Down Expand Up @@ -544,3 +563,6 @@ function pushbutton_quit_Callback(~, ~, handles)
% handles structure with handles and user data (see GUIDATA)
closeFigures(handles);
delete(gcbf)



0 comments on commit cccab37

Please sign in to comment.