Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bucanl_eeglab_extensions
Batch Context
Commits
ed48843c
Commit
ed48843c
authored
Jul 19, 2017
by
Mike Cichonski
Browse files
modified batch edit to save multiple files
parent
235f9f4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
batch/pop_func/pop_batch_edit.m
View file @
ed48843c
...
...
@@ -95,7 +95,9 @@ if nargin < 4
{
'Style'
,
'text'
,
'tag'
,
'txt_bcfp'
,
'string'
,
blanks
(
20
)}
...
%1 this is just to control the size of the GUI
{
'Style'
,
'pushbutton'
,
'string'
,
'get Batch config file names'
,
...
'callback'
,
...
[
'[bcfgFName, bcfgFPath] = uigetfile(
''
*.cfg
''
,
''
Select batch configuration file:
''
,
''
*.cfg
''
,
''
multiselect
''
,
''
on
''
);'
,
...
[
'path =
''
*.cfg
''
;'
...
'if exist(
''
context_config
''
,
''
var
''
); path = [find_hints_context_config(context_config,
''
config_dir
''
) path]; end;'
...
'[bcfgFName, bcfgFPath] = uigetfile(
''
*.cfg
''
,
''
Select batch configuration file:
''
,path,
''
multiselect
''
,
''
on
''
);'
,
...
'if isnumeric(bcfgFName);return;end;'
,
...
'set(findobj(gcbf,
''
tag
''
,
''
edt_bcp
''
),
''
string
''
,bcfgFPath);'
,
...
'set(findobj(gcbf,
''
tag
''
,
''
edt_bcn
''
),
''
string
''
,bcfgFName);'
]}
...
%2
...
...
@@ -109,12 +111,11 @@ if nargin < 4
'batch_config = [];'
...
'for i=1:length(fname);'
,
...
' if isempty(batch_config);'
,
...
' batch_config=text2struct_bc(fullfile(fpath,fname{i}));'
,
...
s
' batch_config=text2struct_bc(fullfile(fpath,fname{i}));'
,
...
' if ~strcmp(batch_config.file_name,fname{i});'
,
...
' disp(
''
changing file_name property...
''
);'
,
...
' batch_config.file_name=fname{i};'
,
...
' level_cell{i} = fname{i};'
,
...
' end;'
,
...
.
' end;'
,
...
' else;'
,
...
' tmp.batch_config=text2struct_bc(fullfile(fpath,fname{i}));'
,
...
' if ~strcmp(tmp.batch_config.file_name,fname{i});'
,
...
...
...
@@ -136,7 +137,7 @@ if nargin < 4
[
'global bcp; batch_config = evalin(
''
caller
''
,
''
batch_config
''
);'
...
'batch_config=propgrid2batchconfig(bcp,batch_config);'
,
...
'for i=1:length(batch_config);'
,
...
' level_cell{i}=
[batch_config(i).file_name]
;'
,
...
' level_cell{i}=
bcp.Properties(i*4).Category
;'
,
...
'end;'
,
...
'if length(level_cell)>1;'
,
...
' level_ind=pop_chansel(level_cell);'
,
...
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment