Skip to content
Snippets Groups Projects
Commit f06cf4c4 authored by Federico Felici's avatar Federico Felici
Browse files

Handle empty targetstruct

parent 5c995789
No related branches found
No related tags found
No related merge requests found
......@@ -221,13 +221,13 @@ classdef SCDclass_algo
targetworkspace = 'global'; % default: global workspace (assigninGlobal)
end
if ~iscell(targetstruct)
if ~iscell(targetstruct) && ~isempty(targetstruct)
targetstruct = {targetstruct};
end
if(~isempty(obj.stdinits))
for ii=1:numel(obj.stdinits)
if contains(obj.stdinits{ii}{2},targetstruct)
if ~isempty(targetstruct) && contains(obj.stdinits{ii}{2},targetstruct)
warning('SCDclass_algo:addfpinitfcn','A function defining the structure %s has already been added, ignoring.\d',targetstruct)
return
end
......@@ -313,6 +313,9 @@ classdef SCDclass_algo
sim(obj.modelname);
end
function open(obj)
open(obj.modelname)
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment