pointers

조회 수: 13 (최근 30일)
mallikarjun
mallikarjun 2012년 4월 1일
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.
  댓글 수: 1
Walter Roberson
Walter Roberson 2012년 4월 1일
MATLAB does not have any pointer data type.

댓글을 달려면 로그인하십시오.

채택된 답변

Titus Edelhofer
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
  댓글 수: 1
mallikarjun
mallikarjun 2012년 4월 1일
hi Edelhofer
thank for your answer.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by