Filter löschen
Filter löschen

How to make NaN data

3 Ansichten (letzte 30 Tage)
hj lee
hj lee am 11 Jun. 2020
Kommentiert: hj lee am 12 Jun. 2020
Hello,
here is the data.
a = [-2 -1 2 3]
b = [1 2 3 4]
c=a.*b
c = [-2 -2 6 12]
right?
but I want to make the NaN value to the negative c data..
in this case, c = [NaN NaN 6 12]
How to do that?
values of b can vary depending on my initial condition, so I need the code which change to NaN automatically.

Akzeptierte Antwort

madhan ravi
madhan ravi am 11 Jun. 2020
  1 Kommentar
hj lee
hj lee am 12 Jun. 2020
Thank you very much!!!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by