Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: vector division
Date: Sat, 14 Feb 2009 20:38:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 15
Message-ID: <gn7a39$muo$1@fred.mathworks.com>
References: <gn69b6$2a3$1@fred.mathworks.com> <gn7700$t03$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1234643881 23512 172.30.248.37 (14 Feb 2009 20:38:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 14 Feb 2009 20:38:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:518280

"Image Analyst" <imageanalyst@mailinator.com> wrote in message <gn7700$t03$1@fred.mathworks.com>...
> "canxenxo 
> Well like Matt said, and the MATLAB documentation for "/" says: "Slash or matrix right division. B/A is roughly the same as B*inv(A). More precisely, B/A = (A'\B')'. See the reference page for mrdivide for more information."
> Here's a little code that may help you out.
> clc;
> clear all;
> a = [1 2;3 4]; 
> b = [13 4; 15 16]; 
> abinv1 = a/b
> binverse = inv(b) % Invert the matrix.
> abinv2 = a * binverse % Same as abinv1

  Well, only very roughly.  The b in this case has no inverse and the two equations with one unknown are overdetermined, so as Matt said matlab resorts to finding the least squares solution instead.

Roger Stafford