pointers

Asked by mallikarjun on 1 Apr 2012
Latest activity Commented on by mallikarjun on 1 Apr 2012

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 Comment

Walter Roberson on 1 Apr 2012

MATLAB does not have any pointer data type.

mallikarjun

Products

1 Answer

Answer by Titus Edelhofer on 1 Apr 2012
Accepted answer

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 Comment

mallikarjun on 1 Apr 2012

hi Edelhofer
thank for your answer.

Titus Edelhofer

Contact us