Skip to content
Snippets Groups Projects
Commit ecc69bde authored by leprob001's avatar leprob001
Browse files

Bugfix, trajectory plot has not been cleared correctly

parent 5bea100b
No related branches found
No related tags found
No related merge requests found
...@@ -35,14 +35,30 @@ end ...@@ -35,14 +35,30 @@ end
for i = 1:length(trajectories) for i = 1:length(trajectories)
fnames = fieldnames(trajectories{i}); fnames = fieldnames(trajectories{i});
for k = 1:length(fnames) for k = 1:length(fnames)
if iscell(trajectories{i}.(fnames{k})) deleteHandles(trajectories{i}.(fnames{k}));
cellfun(@delete, trajectories{i}.(fnames{k})); % if iscell(trajectories{i}.(fnames{k}))
% cellfun(@delete, trajectories{i}.(fnames{k}));
% end
% if isstruct(trajectories{i}.(fnames{k}))
% structfun(@delete, (trajectories{i}.(fnames{k}));
% end
% if ishandle(trajectories{i}.(fnames{k}))
% delete(trajectories{i}.(fnames{k}));
% end
end
end
function deleteHandles(pInput)
if iscell(pInput)
cellfun(@deleteHandles, pInput);
end end
if isstruct(trajectories{i}.(fnames{k})) if isstruct(pInput)
delete(trajectories{i}.(fnames{k})); structfun(@deleteHandles, pInput);
end
if ishandle(pInput)
delete(pInput);
end end
end end
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