Can MATLAB divide two row vectors?

6 visualizaciones (últimos 30 días)
AM
AM el 25 de Nov. de 2013
Comentada: Stephen23 el 31 de Mayo de 2022
Hi. I have a simple question. I inputted [3 3 3]/[4 5 6] in MATLAB and got 0.5844 (format short).
My question is how can MATLAB divide two row vectors?

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 25 de Nov. de 2013
Editada: Azzi Abdelmalek el 25 de Nov. de 2013
a=[3 3 3]
b=[4 5 6]
a./b

Más respuestas (1)

Luca Kaiser
Luca Kaiser el 31 de Mayo de 2022
Hi can anyone explain what Matlab is doing to get the 0.5844?
Thanks!
  2 comentarios
Walter Roberson
Walter Roberson el 31 de Mayo de 2022
[3 3 3]/[4 5 6] is [3 3 3]*pinv([4 5 6]) to within roundoff
Stephen23
Stephen23 el 31 de Mayo de 2022
From the MRDIVIDE documentation: "If A is a rectangular m-by-n matrix with m ~= n, and B is a matrix with n columns, then x = B/A returns a least-squares solution of the system of equations x*A = B."

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