Insert NaN into specific values
Mostra commenti meno recenti
I use this code to insert all the lines in column 4 the numbers equal to 0 equal to NaN, but nothing happens.
That is, I want to insert NaN in all numbers equal to 0 of all rows in column 4.
Does anyone have an idea?
s=load('spi_dca.mat');
spi_dca = s.spi_dca;
mask=spi_dca(:,4)==0;
spi_dca(mask,4)=spi_dca(mask,4)==NaN;
Risposta accettata
Più risposte (1)
Voss
il 7 Gen 2023
s=load('spi_dca.mat');
spi_dca = s.spi_dca;
mask=spi_dca(:,4)==0;
spi_dca(mask,4)=NaN;
Categorie
Scopri di più su Logical in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!