www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@xregpointer/findindex.m

    function ind= findindex(p,q,index)
%FINDINDEX find where p(index) occurs in q
%
%   IND = FINDINDEX(P,Q,INDEX);


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

if nargin>2
    p= p.ptr(index);
else
    p= p.ptr;
end

ind= find(p==q.ptr);