"Nan" values ​​appear when I run the program. How can I remove them?

I have added photos for you to understand the problem:

댓글 수: 8

If you added words too to help us understand the problem that would be even better!
It is very difficult to select data loaded from EXCELL. How can I get "Nan"?
Getting NaN is easy....divide zero with zero....
If it is a cell array (which I assume it must be) then you can replace the NaNs with empty elements [] instead, though whether that is any better or just replacing one thing with another equally unhelpful one I don't know. You cannot simply remove all NaNs though and retain the 2d structure of the data. There has to be 'something' in each cell location, you can't just have a 2d array in which some cells contain 'nothingness'
The question is not clear. To explain or fix, what your code does, we have to see the relevant part of the code. If the NaNs should be replaced, we have to know the data type of the shown matrix and the value you want to get instead.
Please, Muhendisleksi, do not let us guess the details.
'KESIN KOORDINATLAR' NaN NaN 'YAKLASIK KOORDINATLAR' NaN NaN 'KENAR OLCMELERI' NaN NaN NaN 'DOGRULTU OLCMELERI' NaN NaN NaN 'So'
'NN' 'Y (m)' 'X (m)' 'NN' 'Y (m)' 'X (m)' 'DN' 'BN' 'KENAR (m)' 'ms (mm)' 'DN' 'BN' 'DOGRULTU (g)' 'md (cc)' NaN
102 164,526000000000 7849,47400000000 107 719,676000000000 7969,94800000000 102 103 459,192000000000 3 102 108 0 10 10
103 608,285000000000 7731,37300000000 108 342,243000000000 8404,16000000000 103 107 263,297000000000 5 102 107 66,6561300000000 10 NaN
NaN NaN NaN NaN NaN NaN 107 108 575,324000000000 4 102 103 96,8179300000000 10 NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
This is the excel file that the program installs. I wanted to destroy the "nan" there.
Adam
Adam 2017년 8월 15일
편집: Adam 2017년 8월 15일
What do you mean by 'destroy'? Like I said, data has a structure. Your data is in a 2d structure. If you simply remove all the NaNs it will collapse to 1d and lose all its structure. Youre data appears to be ~90% NaNs though which is a little suspicious!
NaNs are the result of an indeterminate operation. So you did something where the computer did not have a valid result to place there.
Essentially, it is best if you show how the NaNs were created. Then you can "remove" them by not creating them in the first place.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

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

질문:

2017년 8월 14일

편집:

2017년 8월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by