www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@contable1/getRelationValues.m
function [L, R] = getRelationValues(c, X, opt) %GETRELATIONVALUES Return the comparison values for the constraint % % [L, R] = GETRELATIONVALUES(CON, X) returns the left- and right-hand side % values for the constraint equation. X should be an array with nFactors( % CON) columns. L and R will be vectors with the same number of rows as X. % % GETRELATIONVALUES(CON, X, OPT) returns the specified values. OPT must % be one of 'left', 'right', or 'both'. The default setting is 'both', % which produces two outputs. % % See also: CONTABLE1/GETRELATION. % Copyright 2005 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin<3 opt = 'both'; end if strcmpi(opt, 'left') LEFT_MODE = 3; L = xreginterp1d(c.breakcols, c.table, getActiveIndices( c ), c.le, X, LEFT_MODE); elseif strcmpi(opt, 'both') LEFT_MODE = 3; [L, R] = xreginterp1d(c.breakcols, c.table, getActiveIndices( c ), c.le, X, LEFT_MODE); else RIGHT_MODE = 4; L = xreginterp1d(c.breakcols, c.table, getActiveIndices( c ), c.le, X, RIGHT_MODE); end