|
Further Examples: QRDecomposition
Performing a QR decomposition on this x matrix yields a pair of matrices.
In[1]:= 
In[2]:= 
Out[2]= 
This checks the result.
In[3]:= 
Out[3]//MatrixForm= 
In[4]:= 
Out[4]= 
The same can be done for inexact matrices.
In[5]:= 
In[6]:= 
Out[6]= 
This checks the result.
In[7]:= 
Out[7]= 
In[8]:= 
Using QRDecomposition to get least-squares solutions of overdetermined systems
Here is a x matrix and a vector.
In[9]:= 
In[10]:= 
The following system of equations is overdetermined.
In[11]:= 

Out[11]= 
This uses QRDecomposition to give a least-squares solution.
In[12]:= 
In[13]:= 
Out[13]= 
This shows how close is to rhs.
In[14]:= 
Out[14]= 
In[15]:= 
|