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
Titus Edelhofer 2012-4-1

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 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by