Divide elements of one vector by another

449 views (last 30 days)
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?

Accepted Answer

Star Strider
Star Strider on 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 Comments
Dushyant Kumar
Dushyant Kumar on 13 Jul 2019
He means thankx in Hindi language :-)
Daniel
Daniel on 21 Mar 2024 at 9:44
simple but effective lol

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!