How to replace values less than equal to zero values in a matrix?

38 visualizzazioni (ultimi 30 giorni)
I have a marix of 44450*8 dimention, which contain some zero and negative values, I want to replace them with NaN. how to do that?

Risposta accettata

Adam
Adam il 14 Nov 2018
myMatrix( myMatrix <= 0 ) = NaN

Più risposte (1)

Sai Naga Raju
Sai Naga Raju il 3 Gen 2021
matrix (matrix<=0)= NaN
  1 Commento
laith awwad
laith awwad il 21 Apr 2021
Modificato: laith awwad il 21 Apr 2021
HOW TO NAME THE VARIABLE BECAUSE IF I WRIGHT IT GIVES ME AN ERROR FOR EXAMPLE e =matrix (matrix<=0)= NaN;

Accedi per commentare.

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by