view m-toolbox/sltpda/sltpda_run_model.m @ 52:daf4eab1a51e database-connection-manager tip

Fix. Default password should be [] not an empty string
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 07 Dec 2011 17:29:47 +0100
parents f0afece42f48
children
line wrap: on
line source

function sltpda_run_model(mdlfile)

% SLTPDA_RUN_MODEL verifies, builds, and runs an sLTPDA model
% 
% usage: sltpda_run_model(mdlfile)
% 
% M Hewitson 28-03-07
% 
% $Id: sltpda_run_model.m,v 1.1 2007/03/30 08:24:36 hewitson Exp $
% 

% get m filename from mdl file
[path,name,ext, vers] = fileparts(mdlfile);
mfile = [fullfile(path, name) '_mfile'];

if sltpda_verify_model(mdlfile)
  
  % parse model file
  cmds = sltpda_parse_model(mdlfile);
  % evaluate each command
  h  = waitbar(0,'Executing pipeline...');
  nc = length(cmds);
  for j=1:nc
    disp(['== executing: ' cmds(j).cmd]);
    eval(cmds(j).cmd);
    waitbar(j/nc,h)
  end
  delete(h);
end

% END