Dear Mike,
I think that using IDL Analyst could help you to get the QR decomposition that you are lookl. More specifically, the routine called IMSL_QRFAC computes the QR factorization of a real matrix A. I tried, from the IDL Analyst Reference Guide examples, the following:
pro QR_test
; Define the coefficient matrix.
a=[[1.,2.,4.],[1.,4.,16.],[1.,6.,36.],[1.,8.,64.]]
; Call IMSL_QRFAC using keywords Q, R, and AP.
IMSL_QRFAC, transpose(a), pvt, Q = q, R = r, AP = ap
; Print the results:
PM, q, Title = 'Q', Format = '(4f12.6)'
PM, r, Title = 'R', Format = '(3f12.6)'
PM, pvt, Title = 'Pvt'
PM, q # r - ap, Title = 'Residual', Format = '(3f12.6)'
end
And it gave me the following results:
Q
-0.053149 -0.542171 0.808224 -0.223607
-0.212598 -0.657436 -0.269408 0.670820
-0.478345 -0.345794 -0.449013 -0.670820
-0.850390 0.392754 0.269408 0.223607
R
-75.259552 -10.629880 -1.594482
0.000000 -2.646819 -1.152647
0.000000 0.000000 0.359211
0.000000 0.000000 0.000000
Pvt
3
2
1
Residual
-0.000004 -0.000001 -0.000000
0.000000 -0.000000 0.000000
0.000000 -0.000000 -0.000000
0.000000 -0.000000 -0.000000
I think this is what you were looking for, isn't it?.
Note that to be able to use this routine requires an IDL Analyst license.
If you interested in evaluating IDL Analyst please, contact your ITT Visual Information Solutions sales, or you could leave a technical support incident too.
Thank you,
Fernando Santoro
|