Divide elements of one vector by another

조회 수: 283 (최근 30일)
Eoghan Daly
Eoghan Daly 2015년 11월 30일
댓글: Daniel 2024년 3월 21일
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?

채택된 답변

Star Strider
Star Strider 2015년 11월 30일
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
Dushyant Kumar
Dushyant Kumar 2019년 7월 13일
He means thankx in Hindi language :-)
Daniel
Daniel 2024년 3월 21일
simple but effective lol

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by