Info
この質問は閉じられています。 編集または回答するには再度開いてください。
hi :) I need help , I have an array of float angles , I want to find the indexes of angles in the range -pi/M<theta<=pi/M thanks
1 回表示 (過去 30 日間)
古いコメントを表示
I try the following code:
(The problem is that this gives me also theta = -pi/M )
tolerance = 10^-4
M = 4;
thetaindxes_in_range = find(abs((abs(theta(:,1))-pi/M)<=tolerance));% theta
0 件のコメント
回答 (1 件)
Image Analyst
2017 年 6 月 3 日
Then don't use abs(). Do each comparison separately. Like this:
M = 4;
indexesInRange = (theta > -pi/M) & (theta <= pi/M)
theta_in_range = theta(indexesInRange)
3 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!