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

    function idx = findfunction(obj, fcn)
%FINDFUNCTION Return the index of a function in the current list
%
%  IDX = FINDFUNCTION(OBJ, FCN) returns the index in the registered list of
%  the function FCN.  If FCN is not in the list, IDX will be empty.

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


idx = find( strcmp( fcn,obj.FunctionNames ) );