NaN entries problem !

1 回表示 (過去 30 日間)
Ano
Ano 2017 年 11 月 3 日
編集済み: Ano 2017 年 11 月 3 日
Hello! I have 2 matrices which I would like to add them (simple addition +) but I get in the resulting matrix some NaN entries , Knowing that non of the 2 matrices contain not even a one NaN entry , I would like to know how these NaN entries are generated and how can I get rid of them ?! I have used the following code to see where is the problem
A1=find(isnan(MATRIX11(1000:1500,1000:1500)+MATRIX21(1000:1500,1000:1500)));
and I get A1=[] (empty) and I have changed the intervals (1000:1500) several timeand I keep getting A1 empty but as I change (1:end) A1 is not empty Note: I couldn't attach the matrices they are larger then the permitted size! Thank you!

採用された回答

Steven Lord
Steven Lord 2017 年 11 月 3 日
One possibility:
>> x = -Inf;
>> y = Inf;
>> z = x+y
z =
NaN

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNaNs についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by