help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Singular matrix


From: Siki Zoltan
Subject: Re: Singular matrix
Date: Mon, 3 Oct 2016 15:06:35 +0200 (CEST)

Dear Lev,

the \ operator works for singular and non quadratic matrices. In this case it search for the minimum norm solution.

for example
inv(A)
ans =

   Inf   Inf
   Inf   Inf

pinv(A)
ans =

   0.10000   0.10000
   0.20000   0.20000

pinv(A) * B
ans =

   2.1000
   4.2000

For more details see
https://www.gnu.org/software/octave/doc/v4.0.1/Arithmetic-Ops.html

Regards
Zoltan

On Mon, 3 Oct 2016, Lev wrote:

Octave 4.0.3

I was playing with simple linear systems.

A=[1,2;1,2]
B=[10;11]

A
A =

  1   2
  1   2

B
B =

  10
  11

A\B
ans =

  2.1000
  4.2000

Which is not the thing I expected. I expected some overflow, since this is 
singular.

Scilab answered this:

matrix is close to singular or badly scaled. rcond =    0.0000D+00
computing least squares solution. (see lsq).


Do I miss something?

--
73 de HA5OGL
Op.: Levente
_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave




reply via email to

[Prev in Thread] Current Thread [Next in Thread]