view m-toolbox/sltpda/sltpda_buildCmd.m @ 39:11e3ed9d2115
database-connection-manager
Implement databases listing in database connection dialog
author |
Daniele Nicolodi <nicolodi@science.unitn.it> |
date |
Mon, 05 Dec 2011 16:20:06 +0100 (2011-12-05) |
parents |
f0afece42f48 |
children |
|
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 ';'];