Azzera filtri
Azzera filtri

How to delete repeating value in a row ?

3 visualizzazioni (ultimi 30 giorni)
code: from a = [1 2 2 4 4 2 2 1 1 4 4 ]
become b = [1 2 4 2 1 4]

Risposta accettata

Bruno Luong
Bruno Luong il 28 Ago 2022
a = [1 2 2 4 4 2 2 1 1 4 4 ]
a = 1×11
1 2 2 4 4 2 2 1 1 4 4
b = a([true diff(a)~=0])
b = 1×6
1 2 4 2 1 4
  1 Commento
omran alshalabi
omran alshalabi il 28 Ago 2022
Thank you very much mr. Bruno Luong for your fast response.
It is function very good.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Vector Fields in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by