How to find unique value in serial order??
Mostra commenti meno recenti
I have a matrix
p = [90 90 -45 0 0 45 45 0 -45];
i want unique values in serial order from right side
q = [90 -45 0 45 0 -45];
Means from right side first value is -45, second is 0, third is 45...etc
I want repeated unique number according to serial from RHS.
Means sort repeated values.
Risposta accettata
Più risposte (1)
Walter Roberson
il 26 Gen 2016
q = p;
q(1+find(q(1:end-1)==q(2:end))) = [];
2 Commenti
Triveni
il 26 Gen 2016
the cyclist
il 26 Gen 2016
p = [90 90 -45 0 0 45 45 0 -45];
pLR = fliplr(p);
idxLR = [true diff(pLR)~=0];
locationsLR = find(fliplr(idxLR))
Categorie
Scopri di più su Startup and Shutdown in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
