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!