# mrdivide undocumented feature?

1 visualización (últimos 30 días)
PeterB el 26 de Jul. de 2017
Comentada: Titus Edelhofer el 26 de Jul. de 2017
I have A = [0 1 ; 3 2] and B = [1 2]. For A / B, I get [0.4 ; 1.4], which is a least squares solution. Here is my problem: where is this documented? I can't see this case covered in the documentation of the mrdivide function. The documentation does say that a least-squared solution is obtained when A is rectangular, but when A is square, all it says is: " If A is a square n-by-n matrix and B is a matrix with n columns, then x = B/A is a solution to the equation x*A = B, if it exists." Since no solution exists, shouldn't it return an error? Or at least, shouldn't the behaviour be documented?
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Respuestas (1)

Titus Edelhofer el 26 de Jul. de 2017
Hi,
I think you might have mixed up A and B from the doc with A and x from your computation:
A/x
In this case your A corresponds to the B where x corresponds to A from doc. And yes, in this case A from doc (your x) is rectangular and B (your A) has n(=2) columns. Everything fine ...
Titus
##### 4 comentariosMostrar 2 comentarios más antiguosOcultar 2 comentarios más antiguos
PeterB el 26 de Jul. de 2017
Duh! OK, now I've got it. Thanks!
Titus Edelhofer el 26 de Jul. de 2017
Your welcome, glad I could help. You may mark the question then as answered, if you like ...

Iniciar sesión para comentar.

### Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by