Replacing specific rows in a matrix.
Ältere Kommentare anzeigen
I would like to replace the cells with the following features (those whose types are 9 or 12 and their ID is one of these numbers, 2,11,12). Then I want to replace them with NaN. However, indexB is a vector of 0 s only.
indexB = ( (Type == 9|Type ==12) & (IDscript ==2|IDscript==11|IDscript==12) );
RT(indexB)=NaN;
2 Kommentare
James Tursa
am 10 Mai 2018
Have you looked at your data to make sure you have any spots that match all of the criteria?
Elaheh
am 10 Mai 2018
Akzeptierte Antwort
Weitere Antworten (1)
Elaheh
am 10 Mai 2018
0 Stimmen
1 Kommentar
sloppydisk
am 10 Mai 2018
Yeah that should work. You can attach the script if it's still not working for you.
Kategorien
Mehr zu Library Development finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!