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

조회 수: 4 (최근 30일)
Yoni Verhaegen -WE-1718-
Yoni Verhaegen -WE-1718- 2020년 10월 29일
답변: Rik 2020년 10월 29일
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

답변 (1개)

Rik
Rik 2020년 10월 29일
Loop over the rows, use isnan and use find with the 'last' switch.

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by