Why isn't array division commutative?

2 visualizaciones (últimos 30 días)
João André
João André el 1 de Dic. de 2013
Respondida: Youssef Khmou el 1 de Dic. de 2013
I have two linear segments (that follow y=mx+b) stored in two data arrays a1 and a2 and want to find the proportionality between them, so that a1=c*a2; However, the output scalar of a1/a2 does not verify this. How can I find the scalar by which a1 must be multiplied to obtain a2?
Thanks in advance.

Respuestas (1)

Youssef  Khmou
Youssef Khmou el 1 de Dic. de 2013
Andre, you mean that a1 and a2 are linearly dependent? then you divide a2 by a1 you obtain a matrix , the diagonal of that matrix contains the same element which is the scalar, here is an example :
a1=randn(10);
a2=a1*5;
f=diag(a2/a1);
F=f(1)

Categorías

Más información sobre Operators and Elementary Operations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by