www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoptimoutput/private/pGenerateOptimItemStrings.m
function thislabels = pGenerateOptimItemStrings(objlabel, numItem) %PGENERATEOPTIMITEMSTRINGS Generate the optimization item strings % % OUTPUT = PGENERATEOPTIMITEMSTRINGS(LABEL, NUMITEMS) returns NUMITEMS % strings in a cell array, all generated from the base string LABEL. The % new strings will be of the form LABEL(N). % Copyright 2005-2008 The MathWorks, Inc. and Ford Global Technologies, Inc. thislabels = cell(1, numItem); if numItem>1 for n = 1:numItem thislabels{n} = sprintf('%s(%d)', objlabel, n); end elseif numItem==1 thislabels{1} = objlabel; end