www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregoptmgr/cellopts.m

    function arg = cellopts(F,ind)
%CELLOPTS Makes a cell with the properties as the first row followed by values
%
%  CELLOPTS(OM) creates a (2-by-N) cell array containing the properties and
%  their values.
%
%  CELLOPTS(OM, IDX) only includes the properties that are specified by
%  their indices

%  Copyright 2000-2006 The MathWorks, Inc. and Ford Global Technologies, Inc.


if nargin==1
    ind = 1:length(F.foptions);
end

arg = cell(2,length(ind));
if ~isempty(ind)
    arg(1,:) = {F.foptions(ind).Param};
    for i=1:length(ind);
        % make sure this is a cell of size 1 so expansion does not occur
        arg{2,i} = {F.foptions(ind(i)).Value};
    end
end