view m-toolbox/classes/@LTPDAworkbench/objs2pipeline.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
line wrap: on
line source

% OBJS2PIPELINE builds new pipelines in the given workbench from the
% history of the input objects.
%
% CALL: objs2pipeline(wb, objs)
%
% M Hewitson 12-11-10
%
% $Id: objs2pipeline.m,v 1.2 2010/08/06 19:10:49 ingo Exp $
%
function objs2pipeline(wb, objs)
  
  % loop over input objects
  for oo=1:numel(objs)
    % get the history object
    hist = objs(oo).hist;
    % get a list of commands
    cmds = hist2m(hist);
    % and discard the first and reorder
    cmds = cmds(end:-1:2);
    % create new diagram
    wb.cmds2pipeline(objs(oo).name, cmds);
  end % end loop over objects
  
end