📄 erp_create_modify_ui.m
字号:
%ERP_CREATE_MODIFY_UI user interface for erp_create_datamat &
% erp_modify_datamat
%
% USAGE: erp_create_modify_ui(ismodify)
%
% Called by ERP_CREATE_DATAMAT, ERP_MODIFY_DATAMAT
%
% I (session_file) - Matlab data file that contains a structure array
% containing the session information for the study
%
% Created on 30-DEC-2002 by Jimmy Shen
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function h01 = erp_create_modify_ui(ismodify)
save_setting_status = 'on';
erp_create_modify_pos = [];
try
load('pls_profile');
catch
end
if ~isempty(erp_create_modify_pos) & strcmp(save_setting_status,'on')
pos = erp_create_modify_pos;
else
w = 0.85;
h = 0.58;
x = (1-w)/2;
y = (1-h)/2;
pos = [x y w h];
end
h01 = figure('Units','normal', ...
'Position',pos, ...
'Color',[0.8 0.8 0.8], ...
'Name','Create Datamat', ...
'MenuBar','none', ...
'NumberTitle','off', ...
'deletefcn','erp_modify_datamat(''delete_fig'');', ...
'WindowStyle', 'normal', ...
'ToolBar','none');
num_line = 8;
factor_line = 1/(num_line+1);
left_margin = 0.05;
x = left_margin;
y = (num_line-0) * factor_line;
w = 0.2;
h = 0.6 * factor_line;
pos = [x y w h];
h1 = uicontrol('Parent',h01, ... % chan selection Label
'Style','text', ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontUnits','normal', ...
'FontSize',0.55, ...
'HorizontalAlignment','center', ...
'String','Channels', ...
'Position',pos);
y = (num_line-2)*factor_line;
h = 2 * factor_line;
pos = [x y w h];
chan_lst_hdl = uicontrol('parent',h01, ... % chan listbox
'unit','normal', ...
'style','listbox', ...
'fontunit','normal', ...
'fontsize',0.16, ...
'max',2, ...
'string',' ', ...
'Callback','erp_modify_datamat(''select_channels'');', ...
'position',pos);
x = x+w+0.01;
y = (num_line-0) * factor_line;
w = 0.2;
h = 0.6 * factor_line;
pos = [x y w h];
h1 = uicontrol('Parent',h01, ... % subj selection Label
'Style','text', ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontUnits','normal', ...
'FontSize',0.55, ...
'HorizontalAlignment','center', ...
'String','Subjects', ...
'Position',pos);
y = (num_line-2)*factor_line;
h = 2 * factor_line;
pos = [x y w h];
subj_lst_hdl = uicontrol('parent',h01, ... % subj listbox
'unit','normal', ...
'style','listbox', ...
'fontunit','normal', ...
'fontsize',0.16, ...
'max',2, ...
'string',' ', ...
'Callback','erp_modify_datamat(''select_subjects'');', ...
'position',pos);
x = x+w+0.01;
y = (num_line-0) * factor_line;
w = 0.23;
h = 0.6 * factor_line;
pos = [x y w h];
h1 = uicontrol('Parent',h01, ... % cond selection Label
'Style','text', ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontUnits','normal', ...
'FontSize',0.55, ...
'HorizontalAlignment','center', ...
'String','Conditions', ...
'Position',pos);
y = (num_line-2)*factor_line;
h = 2 * factor_line;
pos = [x y w h];
cond_lst_hdl = uicontrol('parent',h01, ... % cond listbox
'unit','normal', ...
'style','listbox', ...
'fontunit','normal', ...
'fontsize',0.16, ...
'max',2, ...
'string',' ', ...
'Callback','erp_modify_datamat(''select_conditions'');', ...
'position',pos);
x = x+w+0.01;
y = (num_line-0) * factor_line;
w = 1 - x - left_margin;
h = 0.6 * factor_line;
pos = [x y w h];
h1 = uicontrol('Parent',h01, ... % behav selection Label
'Style','text', ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontUnits','normal', ...
'FontSize',0.55, ...
'HorizontalAlignment','center', ...
'String','Behaviors', ...
'visible','off', ...
'Position',pos);
y = (num_line-2)*factor_line;
h = 2 * factor_line;
pos = [x y w h];
behav_lst_hdl = uicontrol('parent',h01, ... % behav listbox
'unit','normal', ...
'style','listbox', ...
'fontunit','normal', ...
'fontsize',0.16, ...
'max',2, ...
'string',' ', ...
'Callback','erp_modify_datamat(''select_behav'');', ...
'visible','off', ...
'position',pos);
x = left_margin;
y = (num_line-3)*factor_line;
w = 0.19;
h = 0.6 * factor_line;
pos = [x y w h];
h1 = uicontrol('parent',h01, ... % select all channels
'unit','normal', ...
'style','push', ...
'fontunit','normal', ...
'fontsize',0.55, ...
'string','Select All Channels', ...
'callback', 'erp_modify_datamat(''select_all_chan'');', ...
'position',pos);
x = x+w+0.02;
pos = [x y w h];
h1 = uicontrol('parent',h01, ... % select all subjects
'unit','normal', ...
'style','push', ...
'fontunit','normal', ...
'fontsize',0.55, ...
'string','Select All Subjects', ...
'callback', 'erp_modify_datamat(''select_all_subj'');', ...
'position',pos);
x = x+w+0.02;
pos = [x y w h];
h1 = uicontrol('parent',h01, ... % select all conditions
'unit','normal', ...
'style','push', ...
'fontunit','normal', ...
'fontsize',0.55, ...
'string','Select All Conditions', ...
'callback', 'erp_modify_datamat(''select_all_cond'');', ...
'position',pos);
x = x+w+0.05;
pos = [x y w h];
h1 = uicontrol('parent',h01, ... % select all behav
'unit','normal', ...
'style','push', ...
'fontunit','normal', ...
'fontsize',0.55, ...
'string','Select All Behaviors', ...
'callback', 'erp_modify_datamat(''select_all_behav'');', ...
'visible','off', ...
'position',pos);
x = left_margin;
y = (num_line-4)*factor_line;
h = 0.6 * factor_line;
pos = [x y w h];
h1 = uicontrol('parent',h01, ... % Edit Channel Order
'unit','normal', ...
'style','push', ...
'fontunit','normal', ...
'fontsize',0.55, ...
'string','Edit Channel Order ...', ...
'callback', 'erp_modify_datamat(''edit_chan_order'');', ...
'position',pos);
if ~ismodify
x = x+w+0.02;
x = x+w+0.02;
pos = [x y w h];
h1 = uicontrol('parent',h01, ... % Merge Conditions
'unit','normal', ...
'style','push', ...
'fontunit','normal', ...
'fontsize',0.55, ...
'string','Merge Conditions ...', ...
'callback', 'erp_create_datamat(''merge_conditions'');', ...
'position',pos);
end
x = left_margin;
y = (num_line-5)*factor_line;
w = 0.14;
h = 0.6 * factor_line;
pos = [x y w h];
h1 = uicontrol('Parent',h01, ... % Prestim Label
'Style','text', ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontUnits','normal', ...
'FontSize',0.55, ...
'HorizontalAlignment','left', ...
'String','Prestim Baseline:', ...
'Position',pos);
x = x+w;
w = 0.09;
pos = [x y w h];
prestim_hdl = uicontrol('Parent',h01, ... % Prestim Edit
'Style','text', ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontUnits','normal', ...
'FontSize',0.55, ...
'HorizontalAlignment','right', ...
'String',' ', ...
'Position',pos);
x = x+w+0.01;
w = 0.05;
pos = [x y w h];
h1 = uicontrol('Parent',h01, ... % (ms)
'Style','text', ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontUnits','normal', ...
'FontSize',0.55, ...
'HorizontalAlignment','left', ...
'String','(ms)', ...
'Position',pos);
x = x+w+0.03;
w = 0.13;
pos = [x y w h];
h1 = uicontrol('Parent',h01, ... % Sweep Label
'Style','text', ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontUnits','normal', ...
'FontSize',0.55, ...
'HorizontalAlignment','left', ...
'String','Sweep Length:', ...
'Position',pos);
x = x+w;
w = 0.09;
pos = [x y w h];
sweep_hdl = uicontrol('Parent',h01, ... % Sweep Edit
'Style','text', ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -