how can i exclude bins from histogram?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Joseph
il 17 Lug 2015
Risposto: Walter Roberson
il 17 Lug 2015
i have a Netcdf file including latitude(30619x1), altitude(150), N2O(150x30619) other information. i want to make a latitude(30619x1)-altitude(150) histogram by dividing latitude to the bins with width of 5 degrees, and index corresponding N2O(150x30619) to the bins, but i want to excludes a few bins from my histogram. and keep others. for instance, the latitude range is [-90:5:90] but i just want N2O(150x30619) for [15:5:20], [25:5:45] bins from whole latitude(30619x1) for entire altitudes(150).
0 Commenti
Risposta accettata
Walter Roberson
il 17 Lug 2015
lat_inrange_1 = latitude >= 15 & latitude < 20; %watch the edge conditions!
lat_inrange_2 = latitude >= 25 & latitude < 45; %watch the edge conditions!
lat_inrange = lat_inrange_1 | lat_inrange_2;
N2O_subset = N2O(:,lat_inrange);
Now you can histogram on N2O_subset. Assuming I correctly interpreted [15:5:20], [25:5:45] as meaning latitudes in the range 15 to 20 or 25 to 45.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su NetCDF in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!