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일

10 개 추천

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

Eoghan Daly
Eoghan Daly 2015년 11월 30일
So Simple, Thank you
Star Strider
Star Strider 2015년 12월 1일
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 2019년 4월 27일
Dhanyavaad
Star Strider
Star Strider 2019년 4월 27일
What?
Dushyant Kumar
Dushyant Kumar 2019년 7월 13일
He means thankx in Hindi language :-)
Daniel
Daniel 2024년 3월 21일
simple but effective lol

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

질문:

2015년 11월 30일

댓글:

2024년 3월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by