view m-toolbox/sltpda/sltpda_buildCmd.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 cmd = sltpda_buildCmd(inames, onames, params, fcn)
% LTPDA_BUILDCMD Build command string for I/O and paramds and fcn.
% 
% usage: cmd = ltpda_buildCmd(inames, onames, params, fcn)
% 
% M Hewitson 04-05-07
% 
% $Id: sltpda_buildCmd.m,v 1.1 2007/05/06 12:17:38 hewitson Exp $
% 

cmd = '';

% add outputs
if ~isempty(onames)
  cmd = [cmd '['];
  for k=1:length(onames)
    cmd = [cmd onames{k} ','];
  end
  cmd = [cmd(1:end-1) ']'];
  cmd = [cmd ' = '];
end

% add fcn name
cmd = [cmd fcn];

% add inputs
cmd = [cmd '('];
if ~isempty(inames)
  for k=1:length(inames)
    cmd = [cmd inames{k} ','];
  end
end

% add parameters
if ~isempty(params)
  cmd = [cmd params];
else
  cmd = cmd(1:end-1);
end

cmd = [cmd ')'];
cmd = [cmd ';'];