data storage, reduce the repeated elements, recurrence

1 Ansicht (letzte 30 Tage)
hamed amini
hamed amini am 25 Aug. 2017
Kommentiert: Jan am 25 Aug. 2017
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]

Akzeptierte Antwort

Stephen23
Stephen23 am 25 Aug. 2017
Bearbeitet: Stephen23 am 25 Aug. 2017
  3 Kommentare
Adam
Adam am 25 Aug. 2017
RunLength.c is definitely included in the download zip
Jan
Jan am 25 Aug. 2017
@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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Downloads finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by