Divide elements of one vector by another

332 vues (au cours des 30 derniers jours)
Eoghan Daly
Eoghan Daly le 30 Nov 2015
Commenté : Daniel le 21 Mar 2024
Hi MATLAB People,
I have two 35x1 vectors A & B. how do I divide each individual element of A by its corresponding element in B into a new 35x1 vector C?

Réponse acceptée

Star Strider
Star Strider le 30 Nov 2015
Use the element-wise dot operator (./) division:
C = A./B
See Array v Matrix Operations for all the other wonderful things the dot operator can do.
  6 commentaires
Dushyant Kumar
Dushyant Kumar le 13 Juil 2019
He means thankx in Hindi language :-)
Daniel
Daniel le 21 Mar 2024
simple but effective lol

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical 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