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