www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@mbctransform/private/pFuncStr.m

    function [fstr,args] = pFuncStr(f)
%PFUNCSTR convert anonymous function into expression string and argument list
%
% [fstr,args] = pFuncStr(f)

%  Copyright 2007 The MathWorks, Inc.

if ~isempty(f)
    ftok = regexp(func2str(f),'\((.*?)\)(.*)','tokens');
    if ~isempty(ftok)
        fstr = strrep(ftok{1}{2},' ','');
        args = strrep(ftok{1}{1},' ','');
    else
        fstr = '';
    end
else
    fstr = '';
end