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?

 Akzeptierte Antwort

Star Strider
Star Strider am 30 Nov. 2015

10 Stimmen

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 Kommentare

Eoghan Daly
Eoghan Daly am 30 Nov. 2015
So Simple, Thank you
Star Strider
Star Strider am 1 Dez. 2015
My pleasure.
It’s not quite as simple as it might seem. MATLAB has become a large and complex language. It takes a while to learn it, and to learn how to search the documentation. That in part is what MATLAB Answers is useful for.
Manoj Kumar
Manoj Kumar am 27 Apr. 2019
Dhanyavaad
Star Strider
Star Strider am 27 Apr. 2019
What?
Dushyant Kumar
Dushyant Kumar am 13 Jul. 2019
He means thankx in Hindi language :-)
Daniel
Daniel am 21 Mär. 2024
simple but effective lol

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 30 Nov. 2015

Kommentiert:

am 21 Mär. 2024

Community Treasure Hunt

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

Start Hunting!

Translated by