How to find last non-NaN element and replace it with NaN?
Afficher commentaires plus anciens
How can I find for each row of the matrix in Matlab the index of the last non-NaN element and replace these values with NaN?
Thank you

Réponses (1)
Rik
le 29 Oct 2020
0 votes
Loop over the rows, use isnan and use find with the 'last' switch.
Catégories
En savoir plus sur Matrices and Arrays 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!