www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xreglinear/calcRi.m
function Ri = calcRi(m, Q, R); % xreglinear/calcRi % % Ri= calcRi(m); % Inputs: % m - xreglinear % Outputs % Ri matrix to compute PEV with % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin < 3 R = m.Store.R; Q = m.Store.Q; end switch m.qr case 'ols' Ri = inv(R); otherwise Ri = R\Q'; end