Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/arguments/arg_define.m
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@
% cached wrapper around process_spec
function varargout = process_spec_cached(caller_name,spec,report_type,assign_defaults,perform_namecheck)
persistent cache;
caller_field = caller_name;
caller_field = ['x' caller_name];
caller_field(~((caller_field>='a'&caller_field<='z') | (caller_field>='A'&caller_field<='Z') | (caller_field>='0'&caller_field<='9'))) = '_';
key = [report_type 'a'+assign_defaults];
try
Expand Down Expand Up @@ -501,7 +501,7 @@
signature(structmask) = cellfun(@fieldnames,signature(structmask),'UniformOutput',false); end

% determine the number n of arguments that were specified positionally
caller_field = caller_name;
caller_field = ['x' caller_name];
caller_field(~((caller_field>='a'&caller_field<='z') | (caller_field>='A'&caller_field<='Z') | (caller_field>='0'&caller_field<='9'))) = '_';
[n,violations,ignored] = hlp_nanocache(caller_field,10,@get_num_positionals,fmt,length(first_names),signature,structmask,permitted_names,skipped_positionals);

Expand Down
13 changes: 9 additions & 4 deletions code/helpers/hlp_resolve.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,18 @@
end

% check for all entries whether they refer to a stack frame...
marker = 'make_func/@(f,a,frame__';
frames = find(strncmp(entries,marker,23));

if hlp_matlab_version < 806
marker = 'make_func/@(f,a,frame__';
else
marker = '@(f,a,frame__';
end
frames = find(strncmp(entries,marker,length(marker)));


% go through all stack frames...
symbol = char(x);
for k=frames
frameid = entries{k}(24:end-14);
frameid = entries{k}(length(marker)+1:end-14);
% and check if the symbol is present there, then look up
if isfield(tracking.stack.frames.(frameid),symbol)
outargs = tracking.stack.frames.(frameid).(symbol);
Expand Down
9 changes: 7 additions & 2 deletions code/utils/utl_whichfile.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,13 @@ function populate_records(path)
populate_records([path filesep info.name]); end
else
% found a file? add it to the table if an .m file
if length(info.name) > 2 && strcmp(info.name(end-1:end),'.m')
filenames.(info.name(1:end-2)) = [path filesep info.name]; end
if length(info.name) > 2 && strcmp(info.name(end-1:end),'.m')
try
filenames.(info.name(1:end-2)) = [path filesep info.name];
catch
disp_once('utl_whichfile: found .m file that is not a function name: %s (ignoring)',[path filesep info.name]);
end
end
end
end
end
Expand Down
10 changes: 5 additions & 5 deletions userscripts/tutorial_erd1.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
%% --- using the Common Spatial Pattern method ---

% load the data set (BCI2000 format)
traindata = io_loadset('bcilab:/userdata/tutorial/imag_movements1/calib/DanielS001R01.dat');
traindata = io_loadset('bcilab:/userdata/tutorial/imag_movements1/calib/DanielS001R01.dat','channels',1:29);

% define the approach (here: Common Spatial Patterns without any customization)
myapproach = 'CSP';
Expand All @@ -33,7 +33,7 @@
%% --- using the Common Spatial Pattern method with some custom options ---

% load the data set (BCI2000 format)
traindata = io_loadset('bcilab:/userdata/tutorial/imag_movements1/calib/DanielS001R01.dat');
traindata = io_loadset('bcilab:/userdata/tutorial/imag_movements1/calib/DanielS001R01.dat','channels',1:29);

% define the approach
% Note: The settings found in the GUI "Review/Edit Approach" Panel can be translated literally
Expand Down Expand Up @@ -81,7 +81,7 @@
% may run into a local optimum or over-fit spuriously correlated bands

% load the data set
traindata = io_loadset('bcilab:/userdata/tutorial/imag_movements1/calib/DanielS001R01.dat');
traindata = io_loadset('bcilab:/userdata/tutorial/imag_movements1/calib/DanielS001R01.dat','channels',1:29);

% define the approach
myapproach = {'SpecCSP' 'SignalProcessing',{'EpochExtraction',[0.5 3]}};
Expand All @@ -97,7 +97,7 @@
% ( click into the figure to stop the update (and make sure that your click was registered) )

% load feedback session
testdata = io_loadset('bcilab:/userdata/tutorial/imag_movements1/feedback/DanielS001R01.dat');
testdata = io_loadset('bcilab:/userdata/tutorial/imag_movements1/feedback/DanielS001R01.dat','channels',1:29);

% play it back in real time
run_readdataset('Dataset',testdata);
Expand All @@ -115,7 +115,7 @@
% (the number of pattern pairs found optimal should be 3 in this case)

% load the data set (BCI2000 format)
traindata = io_loadset('bcilab:/userdata/tutorial/imag_movements1/calib/DanielS001R01.dat');
traindata = io_loadset('bcilab:/userdata/tutorial/imag_movements1/calib/DanielS001R01.dat','channels',1:29);

% define approach
myapproach = {'CSP' 'Prediction',{'FeatureExtraction',{'PatternPairs',search(1,2,3)}}};
Expand Down