I want to divide each row of a matrix with corresponding element in another matrix .Please help.
78 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
SUNANNA S S
el 17 de Abr. de 2017
Editada: First Last
el 28 de Mzo. de 2018
For eg: I have a matrix
A=[9 6 3;
4 2 8;
1 0 0;]
divide A by B=[3 2 1] to get the result
C=[3 2 1;
2 1 4;
1 0 0;]
0 comentarios
Respuesta aceptada
Más respuestas (2)
First Last
el 28 de Mzo. de 2018
Editada: First Last
el 28 de Mzo. de 2018
Make sure B is transposed to a column vector, i.e.,
C=A./B';
0 comentarios
Ver también
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!