[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Singular matrix
From: |
c. |
Subject: |
Re: Singular matrix |
Date: |
Mon, 3 Oct 2016 16:01:59 +0200 |
On 3 Oct 2016, at 15:39, Bernardo Sulzbach <address@hidden> wrote:
> The warning you mentioned happens again after A changes. As repeating a
> command is not so common (or useful), I think it is fine the way it is.
This happens because before you run A \ b the properties of A are unknown:
>> A = [1 2; 1 2]; b = [1; 1];
>> matrix_type (A)
ans = Full
but when you invoke A \ b Octave tries a factorization and
discovers A is singular and issues the warning
>> A \ b
warning: matrix singular to machine precision
ans =
0.20000
0.40000
and it also marks A as singular so it does not need to check again
>> matrix_type (A)
ans = Singular
So next time you try there is no warning
>> A \ b
ans =
0.20000
0.40000
c.