pointers
조회 수: 13 (최근 30일)
이전 댓글 표시
i arranged matrix or array in ascending order, how Establish a set of pointers P to address the start and end of each block of records that have same value.
채택된 답변
Titus Edelhofer
2012년 4월 1일
Hi,
use the function diff to find the jumps, i.e., the position where the difference is not zero:
p = find(diff(x)~=0);
Titus
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!