www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoptimstore/getInitFreeVal.m

    function x0 = getInitFreeVal(optimstore)
%GETINITFREEVAL Get the initial free values for the optimization.
%  X0 = GETINITFREEVAL(OPTIMSTORE) returns the initial values of the free
%  variables used in the optimization. X0 is a (1-by-NFreeVar) matrix
%  where NFreeVar is the number of free variables in the optimization.
%
%  See also: CGOPTIMOTIONS/SETFREEVARIABLESMODE.

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


if isv2mode(optimstore)
    x0 = getInitialFreeValues(optimstore.OptimRunner, 'all');    
else
    x0 = getInitialFreeValues(optimstore.OptimRunner);
end