フィルターのクリア

<missing> displayed while i am printing the variable in command window

8 ビュー (過去 30 日間)
Moin Ali
Moin Ali 2020 年 8 月 5 日
コメント済み: Moin Ali 2020 年 8 月 17 日
I am writing a power allocation module for NOMA and i am trying to display my array of value After iterations more than 1200 my module starts to display NAN in arrays.
I tried to debug the probabale cause of it and found that one of my variable starts displaying <missing> in command prompt after certain iterations and when that value is added in my final array it becoms aalso NAN.
Can any body share why <missing> is displayed in command prompt (scrrenshot is attached here)
  1 件のコメント
Walter Roberson
Walter Roberson 2020 年 8 月 5 日
Opps, I might have just accidentally deleted your attached file, sorry!

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 8 月 5 日
<missing> is displayed for string objects ( **not** character vectors) when nan is assigned to the object.
Another way of saying this is that somewhere in your code you have an implicit or explicit conversion of number to string object, but you are trying to convert nan. When you do that then it converts to <missing>
>> "the y value is: " + nan
ans =
<missing>
The conversion does not produce
"the y value is: NaN"
You might want to rewrite anything like that to be more like
>> sprintf('the y value is: %f',nan)
ans =
'the y value is: NaN'
Note that the <missing> is not the source of your code problems: it is only happening when you have already generated a nan.
You might want to command
dbstop if naninf
and run your code. Sometimes you need to turn that setting on and off within a function to prevent the tests from getting distracted by code that is outside your control.
  1 件のコメント
Moin Ali
Moin Ali 2020 年 8 月 17 日
thankyou @Walter Roberson.
i apply this to my code and i found that it pause most of the time and i click on continue for the next iteration and after clicking many times it draw graph but the its size is not matched with vector so it not draw curve, si still its a problem for me ...

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGraphics Object Properties についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by