Turn data points into NaNs

조회 수: 1 (최근 30일)
Dirk
Dirk 2012년 6월 14일
답변: Loren Shure 2017년 12월 4일
I have a grid of data (e.g. 10 columns by 10 rows) and I want to turn some of the data points into NaNs. For instance say I want to turn column 1 rows 2 - 6 , column 2 rows 3 - 8, and column 10 rows 3-4 into NaNs, how can I do this. Thanks.

채택된 답변

Loren Shure
Loren Shure 2017년 12월 4일
Look at sub2ind to help you organize the subscripts into linear indices. Then use the linear index to select the values to change.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Elementary Math에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by