Skip to content
Snippets Groups Projects
Commit b9aa3d93 authored by Lemmer, Jan's avatar Lemmer, Jan
Browse files

Merge branch '80-use-strcat-instead-of' into 'development'

Add #82, fix #81

See merge request !27
parents 087ad7e2 ef30fe65
No related branches found
No related tags found
2 merge requests!30Fix CI,!27Add #82, fix #81
Pipeline #585944 passed
...@@ -33,6 +33,18 @@ arguments ...@@ -33,6 +33,18 @@ arguments
end end
%% argument validation %% 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 %catch multiple figures in fig
if numel(figure) > 1 if numel(figure) > 1
figure = figure(1); figure = figure(1);
...@@ -248,15 +260,14 @@ end ...@@ -248,15 +260,14 @@ end
function mustBeDataPath(DataPaths) function mustBeDataPath(DataPaths)
%checks if input is a valid DataPath object %checks if input is a valid DataPath object
if ~iscell(DataPaths)
if isstring(DataPaths) DataPaths = {DataPaths};
end
tf = zeros(1,numel(DataPaths)); tf = zeros(1,numel(DataPaths));
for i=1:numel(DataPaths) for i=1:numel(DataPaths)
tf(i) = ~isfile(DataPaths{i}); tf(i) = ~isfile(DataPaths{i});
end end
else
tf = ~isfile(DataPaths);
end
if any(tf) if any(tf)
eidType = 'mustBeDataPath:notaValidFilePath'; eidType = 'mustBeDataPath:notaValidFilePath';
... ...
......
...@@ -76,8 +76,8 @@ scriptPath = [mfilename('fullpath'),'.m']; ...@@ -76,8 +76,8 @@ scriptPath = [mfilename('fullpath'),'.m'];
%(defined above:) dataset1 = 'test_data.mat'; dataset2 = 'testdata2.h5' %(defined above:) dataset1 = 'test_data.mat'; dataset2 = 'testdata2.h5'
locations = {dataset1,dataset2} ; % don't forget the extension locations = {dataset1,dataset2} ; % don't forget the extension
locations = {string(dataset1),dataset2}
%locations = {'test_data.mat', 'falsch'};
%call publishing %call publishing
PlotID.Publish(locations,scriptPath, fig(1), 'Location', 'local' ,'Method','individual') PlotID.Publish(locations,scriptPath, fig(1), 'Location', 'local' ,'Method','individual')
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment