data storage, reduce the repeated elements, recurrence
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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]
0 Commenti
Risposta accettata
Stephen23
il 25 Ago 2017
Modificato: Stephen23
il 25 Ago 2017
That is called run length encoding. Download this:
Or search FEX yourself:
3 Commenti
Jan
il 25 Ago 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.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Downloads in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!