How to replace values less than ...
19 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
laith awwad
am 21 Apr. 2021
Kommentiert: laith awwad
am 24 Apr. 2021
HOW TO NAME THE VARIABLE BECAUSE IF I WRIGHT IT GIVES ME AN ERROR FOR EXAMPLE e =matrix (matrix<=0)= NaN;
0 Kommentare
Akzeptierte Antwort
DGM
am 21 Apr. 2021
Assuming you have a matrix A and you want to make a copy B which has all nonpositive content replaced with NaN
A=randn(100);
B=A; % make a copy
B(B<=0)=NaN; % replace the values
Trying to do something like
B=A(A<=0)=NaN;
isn't going to work.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!