답변 (1개)

Jan
Jan 2018년 1월 13일
편집: Jan 2018년 1월 13일

0 개 추천

v = sqrt(v_x ^ 2 + v_y ^ 2) % [EDITED] Typo fixed
theta = atan(v_x / v_y)
Looks like a straight forward conversion.
Maybe v_x and v_y are arrays. Then use the elementwise operations:
v = sqrt(v_x .^ 2 + v_y .^ 2)
theta = atan(v_x ./ v_y)

댓글 수: 3

Jan
Jan 2018년 1월 13일
@Image Analyst: Thanks. From time to time I dare to fix obvious typos in the messages of others.
Image Analyst
Image Analyst 2018년 1월 13일
In the future I could, if you'd agree.
Jan
Jan 2018년 1월 13일
Image Analyst, I agree. I appreciate your support.

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

카테고리

도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

질문:

2018년 1월 13일

댓글:

Jan
2018년 1월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by