data storage, reduce the repeated elements, recurrence

1 次查看(过去 30 天)
if input is:
a = [5 5 1 6 6 6 4 4 2]
how to get the output as:
elements: [5 1 6 4 2]
recurrence: [2 1 3 2 1]

采纳的回答

Stephen23
Stephen23 2017-8-25
编辑:Stephen23 2017-8-25
  3 个评论
Adam
Adam 2017-8-25
RunLength.c is definitely included in the download zip
Jan
Jan 2017-8-25
@hamed: Click on the "Download" button on the top right to obtain the zip file, which contains the required C file. You need a C compiler to convert the C file to a mex function. Alternatively you can use the slower RunLength_M version.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Downloads 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by