[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: matrix_type problems
From: |
Vic Norton |
Subject: |
Re: matrix_type problems |
Date: |
Mon, 4 Dec 2006 09:46:54 -0500 |
On 12/4/06, at 6:16 PM +0100, David Bateman wrote:
> You don't have to force the recognition. The matrix will be recognized
> as upper triangular.
Thanks David! You've answered all my questions. I extremely pleased that Octave
now takes advantage of triangular structure!
I guess I won't use the matric_type function at all. I am now using the tests
if QQ_check
if norm(QQ(:, 1:nJ)' * QQ(:, 1:nJ) - eye(nJ), 1) > rows(QQ) * eps
error("the columns of Q are not orthonormal");
endif
endif
if RR_check
RR_requirements = !sum(diag(RR(1:nJ, 1:nJ)) == 0);
for i = 2:nJ
RR_requirements = RR_requirements && !sum(RR(i, 1:i-1) != 0);
endfor
if !RR_requirements
error("R is singular or is not upper triangular");
endif
endif
to check my QRs. I don't care about speed here. I'll set
QQ_check = false; RR_check = false;
in applications.
Regards,
Vic