removing matrix element based on quality flag
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Joseph
am 1 Jun. 2015
Beantwortet: Image Analyst
am 1 Jun. 2015
i have a Netcdf file which includes 150*32024 density matrix and also 150*32024 quality flag matrix (elements of quality flag consist of numbers 1,2,3, ...), that shows the quality of density matrix elements. i want to exclude(replace it by NaN) elements of density matrix related to the quality flag elements equal or greater than 2, how can i do this? Thanks
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 1 Jun. 2015
Try this, using logical indexing:
densityMatrix(qualityMatrix >= 2) = nan;
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu NetCDF 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!