Azzera filtri
Azzera filtri

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

8 visualizzazioni (ultimi 30 giorni)
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)

Risposte (1)

Walter Roberson
Walter Roberson il 5 Ago 2020
<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 Commento
Moin Ali
Moin Ali il 17 Ago 2020
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 ...

Accedi per commentare.

Categorie

Scopri di più su Graphics Object Properties in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by