How to define range for angle
20 次查看(过去 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,19:25
how to classify the angle into the specified ranges in matlab coding
1 个评论
Star Strider
2024-11-14,21:12
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!