www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xreglinear/regression.m
function [r,ok]=regression(m) %REGRESSION returns the regression matrix for the model m % % [r,ok]=regression(m) % Copyright 2000-2007 The MathWorks, Inc. and Ford Global Technologies, Inc. if ~isfield(m.Store,'Q') error(message('mbc:xreglinear:InvalidState4')); end r=m.Store.X; if ~isempty(r) r=r(:,terms2(m)); end if nargout>1 % rank check on regression matrix ok=~(rank(r)<size(r,2)); end