Skip to content
Snippets Groups Projects

Add support for file or function name in scriptPath

3 files
+ 10
4
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 6
1
@@ -27,7 +27,7 @@ function Publish(DataPaths,scriptPath, figure, options)
arguments
DataPaths {mustBeDataPath} % location of the data-file(s)
scriptPath (1,:) {mustBeFile} % location of the matlab script
scriptPath (1,:) {mustBeText} % location of the matlab script
figure (1,:) {mustBeFigure} % Checks if figure is a figure object
options.Location {mustBeMember(options.Location ,{'local','server','manual','CI-Test'})} = 'local' % storage path
options.Method {mustBeMember(options.Method ,{'individual','centralized'})} = 'individual'
@@ -66,6 +66,11 @@ if numel(figure) > 1
warning(msg);
end
% find scriptpath
if ~isfile(scriptPath)
scriptPath= which(['/',scriptPath]);
end
% catch missing .m extension
[~,~, scriptExt] = fileparts(scriptPath);
if isempty(scriptExt)
Loading