www.gusucode.com > mbcexpr 工具箱 matlab 源码程序 > mbcexpr/@cgnormfunction/InversionFilter.m

    function [ptrs,str] = InversionFilter(T,Tlist)
%INVERSIONFILTER

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



% Takes a list of cgtablenodes and works out which of them can be inverted by a cgnormfunction 
% (and hence also cglookupone) and returns a list of these along with a string to display in the listbox.

ptrs = [];
k = 0; str = {};
pInput = get(T,'axesptrs');

for i = 1:length(Tlist)
    temp = getdata(Tlist{i});
    LT = info(temp);
    if isa(temp.info,'cgnormfunction') && issimpletable(LT) && ~isequal(LT,T)
        V = get(LT,'values');
        inpLT = get(LT,'axesptrs');
        % Can't invert empty tables or tables where input is the same as that being inverted.
        if ~isempty(V) && inpLT~=pInput 
            ptrs = [ptrs;temp];
            k = k+1;
            str{k} = sprintf('%s(%s)',getname(LT), inpLT.getname);
            
        end 
    end
end

return