www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@constar/properties.m
function [info, w] = properties( con, status ) %PROPERTIES Return constraint information % % INF=PROPERTIES(CON, STATUS) returns information for the constraint % % INF = PROPERTIES(CON) returns information for the constraint such as the % center of the model, information about the RBF and the transform used. % Copyright 2000-2005 The MathWorks, Inc. and Ford Global Technologies, Inc. F = pBdrydevStatusFlags( xregbdrydev ); % Check if we have information about the center if bitand( F.CanFindBoundaryPoints, status ), % Yes, we have valid info % -- the center info includes info about the active factors factorInfo = i_centerInfo( con ); else % The center is not yet valid so just display a list of active factors factorInfo = pInputFactorProperties( con ); end % Bring the various bits of info together info = [ ... factorInfo i_rbfInfo( con ) {'Transform', con.Transform} ]; w = repmat( 80, 1, size( info, 1 ) ); %-------------------------------------------------------------------------- function info = i_centerInfo( con ) cif = getActiveFactors( con ); nf = length( cif ); center = getCenter( con ); info = cell( nf, 2 ); for i = 1:nf, info{i,1} = sprintf( ' %s', cif.Name{i} ); info{i,2} = sprintf( '%g', center(i) ); end info = [{'Center:', ''}; info]; %-------------------------------------------------------------------------- function info = i_rbfInfo( con ) rbf = get( con.Model, 'rbfpart' ); info = {'Kernel', get( rbf, 'kernel' )}; % if ismember( lower( info{1,2} ), {'wendland', 'gaussian', 'logistrbf', ... % 'multiquadric', 'recmultiquadric'} ), info = [info; {'Width', num2str( get( rbf, 'width' ) )}]; % end if strcmpi( info{1,2}, 'wendland' ), info{1,2} = sprintf( 'Wendland C%d', get( rbf, 'cont' ) ); end