Find and replace array elements that meet a condition
조회 수: 4 (최근 30일)
이전 댓글 표시
I have an array
I have alreay found values in that array the equal 360 and replaced them with 0.
My question is, how do I then find values greater than 360 and replace them with 'that value - 360' ?
댓글 수: 0
채택된 답변
Ameer Hamza
2020년 11월 15일
You need to replace the value, just use rem()
x = 0:1000;
y = rem(x, 360)
댓글 수: 2
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!