Help with removing duplicate sub-elements....
Afficher commentaires plus anciens
Hi, I have a vector a1 and want to get an output a2. Basically, i should identify the starting index of numbers, keep the first value and replace the repeating elements as NaN. I have no idea how to start since i am new to Matlab. Can someone please help?
a1=[-2 -2 -2 -2 NaN NaN NaN -3 -3 -3 -3 NaN NaN -2 -2 -2 NaN -3 -3 NaN NaN 1 1 1 1 NaN NaN 4 4 4 NaN NaN 3 3 3 NaN];
a2=[-2 NaN NaN NaN NaN NaN NaN -3 NaN NaN NaN NaN NaN -2 NaN NaN NaN -3 NaN NaN NaN 1 NaN NaN NaN 4 NaN NaN NaN NaN 3 NaN NaN NaN];
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Correlation and Convolution dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!