I have an array of angles and I need to identify periods where this array is above or below certain thresholds
이전 댓글 표시
Array of angles ranges from 0 - 360. I need to know the indices of values below 15, between 165 and 195, and above 345. Attempted using:
array_logical = array < 15 && 165 < array < 195 && 345 < array;
array_logical = array < 15 || 165 < array < 195 || 345 < array;
What is the best way to apply these three conditions in one logical array?
채택된 답변
추가 답변 (1개)
Mischa Kim
2014년 4월 10일
편집: Mischa Kim
2014년 4월 10일
Use
array_ind = find(array<15 | (array>=165 & array<=195) | array>345)
카테고리
도움말 센터 및 File Exchange에서 Entering Commands에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!