www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgnormnode/fill.m

    function [node, ok, msg] = fill( node, tableptr, featureptr )
%FILL Setup and run the breakpoint fill algorithm
%
%  [NORMNODE, OK, MSG] = FILL( NORMNODE, PTABLE, PFEATURE )
%    PTABLE, pointer to the table this normalizer feeds into
%    PFEATURE, pointer to the feature this normalzer is in
%
%    OK = false -> msg is an error condition
%    OK = true  -> msg is some information

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


ok = true;
msg = '';

M = get( node, 'managers');
if isempty( M.InitialisationManager )
    [M.InitialisationManager, ok, msg] = bpfill(tableptr.info, featureptr.info);
    if ~ok
        return
    end
end

[M.InitialisationManager,OK] = gui_setup(M.InitialisationManager,'figure',{'expanded',1,'title', 'Breakpoint Fill Options'});

if OK
    try
        [tableptr.info,cost, OK, msg] = run(M.InitialisationManager,tableptr.info,[], featureptr.info);
        if ~OK
            msg = sprintf('Cannot fill the breakpoints. %s', msg);
            ok = false;
        else
            msg = sprintf('Filled breakpoints. %s', msg);
            ok = true;
        end
    catch ME
        msg = sprintf('Unknown error occurred during breakpoint filling. %s', ME.message);
        ok = false;
    end
end