Change value to NaN element
古いコメントを表示
Hi, i have a matrix 7938x498 with numerical and NaN values. I want to change value to some NaN elements but i don't know exactly their index in the matrix. I make an example to explain it better.
if i have a vector like this A=(NaN,NaN,NaN,NaN,NaN,1,5,7,9,NaN,NaN,NaN,NaN,5,5,53,3,NaN,NaN). How can i change the NaN values beetween 9 and 5 without change the others? Thanks
5 件のコメント
Scott MacKenzie
2021 年 4 月 27 日
What you are asking for seems reasonable. However, can you describe the problem in more general terms. What if there are many sequences of numbers interspersed with NaN sequences?
dpb
2021 年 4 月 27 日
Or, another way to ask the same question -- how do you determine which locations it is that are wanted to be changed? Is it based on the value of the element itself of, in the example given, because it is the sequence after the sequence of finite values and it doesn't matter that 9 is 9 or 5 is 5; just that they are finite?
Giacomo Abrardo
2021 年 4 月 27 日
Giacomo Abrardo
2021 年 4 月 27 日
Giacomo Abrardo
2021 年 4 月 27 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Interpolation of 2-D Selections in 3-D Grids についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
