How to define range for angle
조회 수: 15 (최근 30일)
이전 댓글 표시
I have two angles theta1 and theta2 such that 0<theta1<pi/2 and 0<theta2<pi How do I define these angles in Matlab? I have used theta1=0:pi/2; theta2=0:pi;
but the problem is that further down in the task i need to use (theta1+theta2) which is not possible since by above range theta1 and theta2 have different dimensions.
댓글 수: 0
채택된 답변
Star Strider
2015년 8월 28일
If you want them both to have the same dimensions, use the linspace function:
theta1 = linspace(0, pi/2, 50);
theta2 = linspace(0, pi, 50);
Both of these have the length determined by the third argument (here 50), producing a (1x50) vector for each one.
댓글 수: 0
추가 답변 (1개)
Mingwei
2024년 11월 14일
how to classify the angle into the specified ranges in matlab coding
댓글 수: 1
Star Strider
2024년 11월 14일
Your quesiton is a bit ambiguous.
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!