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

    function pos = getFactorIndex(op,ptr)
%GETFACTORINDEX
%
%  IDX = GETFACTORINDEX(op,ptr) returns the index in the dataset of ptr. If
%  ptr is a pointer to a feature, the index of the feature's strategy will
%  be returned.

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


pos = findptrs(ptr,op.ptrlist);

% remove linked factor with copied data
ftype3= find(op.factor_type==3);
if ~isempty(ftype3)
    pos( ismember(pos, ftype3) ) = 0;
end