[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #57145] backslash vs. pinv
From: |
Muhali |
Subject: |
[Octave-bug-tracker] [bug #57145] backslash vs. pinv |
Date: |
Wed, 30 Oct 2019 12:34:40 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0 |
URL:
<https://savannah.gnu.org/bugs/?57145>
Summary: backslash vs. pinv
Project: GNU Octave
Submitted by: muhali
Submitted on: Wed 30 Oct 2019 09:34:39 AM PDT
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 5.1.0
Operating System: GNU/Linux
_______________________________________________________
Details:
A = magic(8);
A = A(:,1:6) ;
b = 260*ones(8,1) ;
x1 = A\b
x2 = pinv(A)*b
x3 = [3 4 0 0 1 0]' ;
norm(A*x1-b)
norm(A*x3-b)
There are two (possibly well known) issues here.
a) x1 differs from Matlab (which gives x3).
b) solution x3 is "closer" than solution x1.
The example comes from the Matlab pinv help. ML probably uses a
different/better optimization algorithm, so the difference should perhaps be
mentioned at least.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57145>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #57145] backslash vs. pinv,
Muhali <=