Hello!
I have a struct called "modelo" that contains (among other variables) a numeric variable called "Val", which is 41714x81X29. There are random NaN's scattered throughout the data in this struct and I would like to remove them, creating a new variable without any NaN. I have tried writng:
modelo2 = modelo(~isnan([modelo.Val(:,:,:]));
but it says "Index exceeds matrix dimensions".
Does anyone could helpe me, please?

 채택된 답변

madhan ravi
madhan ravi 2019년 6월 11일

0 개 추천

modelo2 = modelo.Val(~isnan(modelo.Val));

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Type Conversion에 대해 자세히 알아보기

제품

릴리스

R2016a

태그

질문:

2019년 6월 11일

댓글:

2019년 6월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by