Azzera filtri
Azzera filtri

How to find last non-NaN element and replace it with NaN?

5 visualizzazioni (ultimi 30 giorni)
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

Risposte (1)

Rik
Rik il 29 Ott 2020
Loop over the rows, use isnan and use find with the 'last' switch.

Categorie

Scopri di più su Loops and Conditional Statements 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