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
Branches
Tags
2 merge requests!30Fix CI,!27Add #82, fix #81
Pipeline #585944 passed
......@@ -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)
......
......@@ -76,8 +76,8 @@ scriptPath = [mfilename('fullpath'),'.m'];
%(defined above:) dataset1 = 'test_data.mat'; dataset2 = 'testdata2.h5'
locations = {dataset1,dataset2} ; % don't forget the extension
locations = {string(dataset1),dataset2}
%locations = {'test_data.mat', 'falsch'};
%call publishing
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 register or to comment