Effacer les filtres
Effacer les filtres

how to divide two matrix

36 vues (au cours des 30 derniers jours)
farfar
farfar le 3 Fév 2017
Commenté : farfar le 3 Fév 2017
hi everyone I have 2 matrix like
a=[10 12 15;15 16 18;14 18 19;15 19 25;23 45 75]
b=[2 4 5;1 2 2;4 8 6;1 4 7;5 1 2]
how can I divide each elements of matrix "a" by corresponding value in matrix "b" to have
c=[5 3 3;15 8 9;........]
? the original matrix are big. Thanks

Réponse acceptée

the cyclist
the cyclist le 3 Fév 2017
Modifié(e) : the cyclist le 3 Fév 2017
c = a./b;
This is a very basic MATLAB question. I suggest you google "matlab tutorial" and look through some of the excellent (and free) online material that is available.
  1 commentaire
farfar
farfar le 3 Fév 2017
you are right, for some reason I thought I need a loop for this ! thanks anyway

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by