필터 지우기
필터 지우기

Angle between a vector and a line parallel with the y-axis? (image example)

조회 수: 12 (최근 30일)
Hi, I have this red point with coordinates (x1,y1) and I would like to calculate the angles that each vector departing from the red point to the black ones form with a line parallel to the y-axis. How should I do? I'm so sorry for the drawing but that is exactly the scenario. Thanks!

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 11월 3일
Try something like this
P = [-3, 5]; % (x1,y1)
x = [0 10]; % point of y-axis
Px = x-P;
angle = atan2(Px(1), -Px(2))
  댓글 수: 6
Davide Mori
Davide Mori 2020년 11월 4일
You are right, I don't know I got that result ahahah, thank you so much!

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

추가 답변 (0개)

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by