Skip to content

Commit

Permalink
Changing isstr for ischar and adding new line at the end of files
Browse files Browse the repository at this point in the history
  • Loading branch information
arno committed Jul 15, 2018
1 parent 0c6caa7 commit 3e3d41b
Show file tree
Hide file tree
Showing 258 changed files with 636 additions and 636 deletions.
2 changes: 1 addition & 1 deletion functions/@eegobj/rmfield.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function this = rmfield(this, vals);

this.EEG = rmfield(this.EEG, vals);


2 changes: 1 addition & 1 deletion functions/@memmapdata/double.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
function res = double(a);

res = double(a.data.data.x);
res = double(a.data.data.x);
2 changes: 1 addition & 1 deletion functions/@memmapdata/memmapdata.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
function dataout = memmapdata(data, datadims);

dataout.fileformat = 'normal';
if isstr(data)
if ischar(data)
if length(data) > 3
if strcmpi('.dat', data(end-3:end))
dataout.fileformat = 'transposed';
Expand Down
12 changes: 6 additions & 6 deletions functions/@memmapdata/subsref.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
% one dimension input
% -------------------
if length(s(1).subs) == 1
if isstr(subs{1})
if ischar(subs{1})
subs{1} = [1:size(a,1)];
subs{2} = [1:size(a,2)];
if ndims(a) == 3, subs{3} = [1:size(a,3)]; end;
Expand All @@ -40,9 +40,9 @@
% two dimension input
% -------------------
elseif length(s(1).subs) == 2
if isstr(subs{1}), subs{1} = [1:size(a,1)]; end;
if ischar(subs{1}), subs{1} = [1:size(a,1)]; end;

if isstr(subs{2}),
if ischar(subs{2}),
subs{2} = [1:size(a,2)];
if ndims(a) == 3, subs{3} = [1:size(a,3)]; end;
end;
Expand All @@ -55,12 +55,12 @@
% ---------------------
elseif length(s(1).subs) == 3

if isstr(subs{1}), subs{1} = [1:size(a,1)]; end;
if isstr(subs{2}), subs{2} = [1:size(a,2)]; end;
if ischar(subs{1}), subs{1} = [1:size(a,1)]; end;
if ischar(subs{2}), subs{2} = [1:size(a,2)]; end;
if ndims(a) == 2,
subs(3) = [];
else
if isstr(subs{3}), subs{3} = [1:size(a,3)]; end;
if ischar(subs{3}), subs{3} = [1:size(a,3)]; end;
end;
finaldim = cellfun('length', subs);

Expand Down
2 changes: 1 addition & 1 deletion functions/@mmo/changefile.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

movefile(obj.dataFile, newfile);
obj.dataFile = newfile;
obj.writable = false;
obj.writable = false;
2 changes: 1 addition & 1 deletion functions/@mmo/checkcopies_local.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
ncopies = 1;
else
ncopies = 0;
end;
end;
2 changes: 1 addition & 1 deletion functions/@mmo/ctranspose.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
end;
end;
end;


2 changes: 1 addition & 1 deletion functions/@mmo/display.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
tmpMMO = memmapfile(obj.dataFile, 'writable', obj.writable, 'format', { 'single' obj.dimensions 'x' });
if obj.transposed, disp('Warning: data does not display properly for memory mapped file which have been transposed'); end;
disp(tmpMMO.data.x);


2 changes: 1 addition & 1 deletion functions/@mmo/double.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
function a = double(a);

return;
return;
2 changes: 1 addition & 1 deletion functions/@mmo/mmo.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
% check that the file is not empty
% --------------------------------
if ~isempty(dataFileIn)
if ~isstr(dataFileIn)
if ~ischar(dataFileIn)
error('First input must be a file name');
end;

Expand Down
2 changes: 1 addition & 1 deletion functions/@mmo/size.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@
end;
end;



10 changes: 5 additions & 5 deletions functions/@mmo/subsasgn.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
nonSingleton = [];
ss2 = ss;
for index = 1:length(ss(1).subs)
if ~isstr(ss(1).subs{index}) % can only be ":"
if ~ischar(ss(1).subs{index}) % can only be ":"
nonSingleton(end+1) = index;
if islogical( ss(1).subs{index}), ss(1).subs{index} = find( ss(1).subs{index}); end
ss2(1).subs{index} = setdiff_bc([1:newdim1(index)], ss(1).subs{index}); % invert selection
Expand Down Expand Up @@ -107,7 +107,7 @@
end;
end;
newdim2(nonSingleton) = newdim2(nonSingleton)-length(ss(1).subs{nonSingleton});
if isstr(ss2.subs{end})
if ischar(ss2.subs{end})
ss2.subs{end} = [1:prod(newdim1(length(ss2.subs):end))];
end;
ss3 = ss2;
Expand Down Expand Up @@ -144,7 +144,7 @@
newdim1 = obj.dimensions;
newdim2 = newdim1;
if length(ss(1).subs) == 1
if ~isstr(ss(1).subs{1}) && max(ss(1).subs{1}) > prod(newdim1)
if ~ischar(ss(1).subs{1}) && max(ss(1).subs{1}) > prod(newdim1)
if length(newdim1) > 2
error('Attempt to grow array along ambiguous dimension.');
end;
Expand All @@ -158,7 +158,7 @@
else
if length(newdim1) == 3 && newdim1(3) == 1, newdim1(end) = []; end;
if length(ss(1).subs) == 2 && length(newdim1) == 3
if ~isstr(ss(1).subs{2}) && max(ss(1).subs{2}) > prod(newdim1(2:end))
if ~ischar(ss(1).subs{2}) && max(ss(1).subs{2}) > prod(newdim1(2:end))
error('Attempt to grow array along ambiguous dimension.');
end;
if isnumeric(ss(1).subs{1}), newdim2(1) = max(max(ss(1).subs{1}), newdim2(1)); end;
Expand Down Expand Up @@ -253,7 +253,7 @@
% array, copy each channel
for index1 = 1:size(val,1)
ss2(1).subs{1} = index1;
if isstr(ss(1).subs{1}) ss3(1).subs{1} = index1;
if ischar(ss(1).subs{1}) ss3(1).subs{1} = index1;
else ss3(1).subs{1} = ss(1).subs{1}(index1);
end;
tmpMMO.Data.x = builtin('subsasgn', tmpMMO.Data.x, ss3, subsref(val,ss2));
Expand Down
2 changes: 1 addition & 1 deletion functions/@mmo/subsasgn_old.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
% ----------------------------
nonSingleton = [];
for index = 1:length(subs)
if ~isstr(subs{index}) % can only be ":"
if ~ischar(subs{index}) % can only be ":"
nonSingleton(end+1) = index;
subs2 = setdiff_bc([1:newdim1(index)], subs{index}); % invert selection
end;
Expand Down
4 changes: 2 additions & 2 deletions functions/@mmo/subsref.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
% convert : to real sizes
% -----------------------
lastdim = length(subs);
if isstr(subs{end}) && ndims(obj) > lastdim
if ischar(subs{end}) && ndims(obj) > lastdim
for index = lastdim+1:ndims(obj)
if index > length(obj.dimensions)
subs{index} = 1;
Expand All @@ -53,7 +53,7 @@
end;
end;
for index = 1:length(subs)
if isstr(subs{index}) % can only be ":"
if ischar(subs{index}) % can only be ":"
if index > length(obj.dimensions)
subs{index} = 1;
else
Expand Down
2 changes: 1 addition & 1 deletion functions/@mmo/transpose.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

res = ctranspose(obj, 0);



2 changes: 1 addition & 1 deletion functions/@mmo/unitaryopp.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
% -------------
obj2 = mmo(newFileName, obj1.dimensions, true, obj1.transposed);
obj2 = updateWorkspace(obj2);


2 changes: 1 addition & 1 deletion functions/@mmo/var.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
if isempty(flag) || flag == 0
sumval = sumval/(size(obj,dim)-1);
else sumval = sumval/size(obj,dim);
end;
end;
2 changes: 1 addition & 1 deletion functions/adminfunc/+up/updater.m
Original file line number Diff line number Diff line change
Expand Up @@ -368,4 +368,4 @@ function launchGui(obj, installDirectory, goOneFolderLevelIn, backGroundColor, p

end;
end
end
end
4 changes: 2 additions & 2 deletions functions/adminfunc/eeg_checkchanlocs.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@
if isfield(chanedit, 'plotrad'),
plotrad = chanedit(1).plotrad;
chanedit = rmfield(chanedit, 'plotrad');
if isstr(plotrad) && ~isempty(str2num(plotrad)), plotrad = str2num(plotrad); end;
if ischar(plotrad) && ~isempty(str2num(plotrad)), plotrad = str2num(plotrad); end;
chaninfo.plotrad = plotrad;
end;
if isfield(chanedit, 'shrink') && ~isempty(chanedit(1).shrink)
shrinkorskirt = 1;
if ~isstr(chanedit(1).shrink)
if ~ischar(chanedit(1).shrink)
plotrad = 0.5/(1-chanedit(1).shrink); % convert old values
end;
chanedit = rmfield(chanedit, 'shrink');
Expand Down
2 changes: 1 addition & 1 deletion functions/adminfunc/eeg_eval.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
% ----------------------
g = finputcheck( varargin, { 'params' 'cell' {} {};
'warning' 'string' { 'on','off' } 'on' }, 'eeg_eval');
if isstr(g), error(g); end;
if ischar(g), error(g); end;

% warning pop up
% --------------
Expand Down
8 changes: 4 additions & 4 deletions functions/adminfunc/eeg_getdatact.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

% reading data from several datasets and concatening it
% -----------------------------------------------------
if iscell(EEG) || (~isstr(EEG) && length(EEG) > 1)
if iscell(EEG) || (~ischar(EEG) && length(EEG) > 1)
% decode some arguments
% ---------------------
trials = cell(1,length(EEG));
Expand Down Expand Up @@ -108,7 +108,7 @@

% if string load dataset
% ----------------------
if isstr(EEG)
if ischar(EEG)
EEG = pop_loadset('filename', EEG, 'loadmode', 'info');
end;

Expand All @@ -123,7 +123,7 @@
'trialindices' {'integer','cell'} { {} {} } [];
'rmcomps' {'integer','cell'} { {} {} } [] }, 'eeg_getdatact');

if isstr(opt), error(opt); end;
if ischar(opt), error(opt); end;
channelNotDefined = 0;
if isempty(opt.channel), opt.channel = [1:EEG.nbchan]; channelNotDefined = 1;
elseif isequal(opt.channel, [1:EEG.nbchan]) && ~isempty(opt.interp) channelNotDefined = 1;
Expand All @@ -142,7 +142,7 @@
% get data boundaries if continuous data
% --------------------------------------
boundaries = [];
if nargout > 1 && EEG.trials == 1 && ~isempty(EEG.event) && isfield(EEG.event, 'type') && isstr(EEG.event(1).type)
if nargout > 1 && EEG.trials == 1 && ~isempty(EEG.event) && isfield(EEG.event, 'type') && ischar(EEG.event(1).type)
if ~isempty(opt.samples)
disp('WARNING: eeg_getdatact.m, boundaries are not accurate when selecting data samples');
end;
Expand Down
2 changes: 1 addition & 1 deletion functions/adminfunc/eeg_getversion.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
indsDot = find(tmpvers == '.' );
tmpvers(indsDot(2:end)) = [];
versnum = str2double(tmpvers);
if isnan(versnum), versnum = []; end
if isnan(versnum), versnum = []; end
2 changes: 1 addition & 1 deletion functions/adminfunc/eeg_global.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@
if exist('eegplugin_erplab.m')
global ALLERP; % Javier Lopez-Calderon for ERPLAB
end
end
end
2 changes: 1 addition & 1 deletion functions/adminfunc/eeg_readoptions.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
opt_backup = [];
end;

if isstr(filename)
if ischar(filename)
fid = fopen(filename, 'r');
else fid = filename;
end;
Expand Down
2 changes: 1 addition & 1 deletion functions/adminfunc/eeglab_error.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@
header = [ funcname ' error' ];
end;
catch
end;
end;
2 changes: 1 addition & 1 deletion functions/adminfunc/getkeyval.m
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
if nargin < 3
mode = '';
end;
if isstr(mode) & strcmp(mode, 'present')
if ischar(mode) & strcmp(mode, 'present')
if ~isempty(findstr(var, lastcom))
txt = 1; return;
else
Expand Down
2 changes: 1 addition & 1 deletion functions/adminfunc/intersect_bc.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
end;
else
[C,IA,IB] = intersect(A,B,varargin{:});
end;
end;
2 changes: 1 addition & 1 deletion functions/adminfunc/iseeglabdeployed.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
val = isdeployed;
catch
val = 0;
end
end
2 changes: 1 addition & 1 deletion functions/adminfunc/ismatlab.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
res = 1;
else
res = 0;
end;
end;
2 changes: 1 addition & 1 deletion functions/adminfunc/ismember_bc.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
end;
else
[C,IA] = ismember(A,B,varargin{:});
end;
end;
2 changes: 1 addition & 1 deletion functions/adminfunc/plugin_convert.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
plugin(iRow).status = pluginOri(iRow).status;
plugin(iRow).name = pluginOri(iRow).plugin;
plugin(iRow).installed = 1;
end;
end;
2 changes: 1 addition & 1 deletion functions/adminfunc/plugin_deactivate.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
movefile(fullpluginfolder, fulldeactivatedpluginfolder);
catch
eeglab_error;
end;
end;
2 changes: 1 addition & 1 deletion functions/adminfunc/plugin_extract.m
Original file line number Diff line number Diff line change
Expand Up @@ -331,4 +331,4 @@
% str = [ 'web(''' url ''');' ];
%else
str = [ 'web(''' url ''', ''-browser'');' ];
%end;
%end;
2 changes: 1 addition & 1 deletion functions/adminfunc/plugin_getweb.m
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,4 @@
currentRow(openTag(iTag):closeTag(iTag)) = [];
end;
txt = currentRow;
end;
end;
2 changes: 1 addition & 1 deletion functions/adminfunc/plugin_install.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@
end;
end;
fprintf('Extension %s version %s now installed\n', name, version);


2 changes: 1 addition & 1 deletion functions/adminfunc/plugin_movepath.m
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@
res = 1;
else
res = 0;
end;
end;
2 changes: 1 addition & 1 deletion functions/adminfunc/plugin_reactivate.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
movefile(fullpluginfolder, fulldeactivatedpluginfolder);
catch
eeglab_error;
end;
end;
2 changes: 1 addition & 1 deletion functions/adminfunc/plugin_remove.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
rmdir(fullpluginfolder, 's');
catch
eeglab_error;
end;
end;
2 changes: 1 addition & 1 deletion functions/adminfunc/plugin_urlwrite.m
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@
end
end

status = 1;
status = 1;
Loading

0 comments on commit 3e3d41b

Please sign in to comment.