Skip to content
Snippets Groups Projects

Add #82, fix #81

Merged Lemmer, Jan requested to merge 80-use-strcat-instead-of into development
2 files
+ 20
9
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 19
8
@@ -33,6 +33,18 @@ arguments
end
%% argument validation
%catch string and non cell inputs in DataPaths
if ~iscell(DataPaths)
DataPaths = {DataPaths}; %Cell array
end
for i=1:numel(DataPaths)
if isstring(DataPaths{i});
% strings will cause problems
DataPaths{i} = char(DataPaths{i});
end
end
%catch multiple figures in fig
if numel(figure) > 1
figure = figure(1);
@@ -248,14 +260,13 @@ end
function mustBeDataPath(DataPaths)
%checks if input is a valid DataPath object
if isstring(DataPaths)
tf = zeros(1,numel(DataPaths));
for i=1:numel(DataPaths)
tf(i) = ~isfile(DataPaths{i});
end
else
tf = ~isfile(DataPaths);
if ~iscell(DataPaths)
DataPaths = {DataPaths};
end
tf = zeros(1,numel(DataPaths));
for i=1:numel(DataPaths)
tf(i) = ~isfile(DataPaths{i});
end
if any(tf)
Loading