A new release for GNU Octave
A new release for GNU Octave
Posted Dec 17, 2020 9:27 UTC (Thu) by bneven (subscriber, #53893)Parent article: A new release for GNU Octave
Posted Dec 17, 2020 10:02 UTC (Thu)
by xyz (subscriber, #504)
[Link]
>> A = [1 2 3; 3 2 1; 2 2 2];
0.3333
As you see Octave is saying that within the used precision the matrix is non-invertible and so the solution is not unique.
Regarding linsolve this is what the first lines have to say about it. (TL;DR linsolve is an advance frontend when used with other options)
>> help linsolve
-- X = linsolve (A, B)
With no options, this function is equivalent to the left division
Posted Dec 20, 2020 17:40 UTC (Sun)
by leephillips (subscriber, #100450)
[Link]
A new release for GNU Octave
It is not idiomatic as the usual way would be to use the left division operator, also following the usual notation the matrix is represented with a capital letter:
>> b = [2 2 2]';
>> A \ b
warning: matrix singular to machine precision
ans =
0.3333
0.3333
'linsolve' is a function from the file /home/jamatos/devel/octave/scripts/linear-algebra/linsolve.m
-- X = linsolve (A, B, OPTS)
-- [X, R] = linsolve (...)
Solve the linear system 'A*x = b'.
operator ('x = A \ b') or the matrix-left-divide function
('x = mldivide (A, b)').
....
A new release for GNU Octave