MATLAB Answers

Positive angles in a graph

조회 수: 18(최근 30일)
How can I have all positive angles in a graph, that I mean I have a graph plot(x,alfa) for example and all angles are positive, but one,180° is not positive, but negative in the graph, -180° and this messes up the graph, how can I do?

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 3 Apr 2021
%Force all angles must be positive.
mask=theta<0;
mask=360*double(mask);
theta=theta+mask;
  댓글 수: 1
Andrea Cesaro
Andrea Cesaro 3 Apr 2021
Thank you

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

추가 답변(1개)

VBBV
VBBV 3 Apr 2021
%if true
ylim([0 180])
Use this after plot

Community Treasure Hunt

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

Start Hunting!

Translated by