intensity of dought events
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Nurul Ain Basirah Zakaria
am 12 Jun. 2021
Kommentiert: Nurul Ain Basirah Zakaria
am 13 Jun. 2021
Hi, I have a drought duration over time file. So, it is the drought duration event where it contains consecutive months of negative value, so, i need to calculate the mean intensity of each drought events, can I do it in matlab?
0 Kommentare
Antworten (2)
Sulaymon Eshkabilov
am 12 Jun. 2021
Use can use mean()
4 Kommentare
Sulaymon Eshkabilov
am 12 Jun. 2021
Here is a nice discussion on how to locate consequitive numbers:
You can find relevant comments and answers to this question of yours.
Image Analyst
am 12 Jun. 2021
You need to use regionprops(), which will get you both the length of each drought, as well as it's mean value. You can also get the max value if you want with 'MaxIntensity':
d = [1 -2 -2 -4 -5 -1 3 3 -3 -4.5 -8 5 6 7] % 2 regions of negative runs
% Find negative regions - binarize.
bw = d < 0
% Make measurements
props = regionprops(bw, d, 'Area', 'MeanIntensity');
% Get the lengths of all the runs
droughtDurations = [props.Area]
% Get the mean value for each of the 2 runs
droughtIntensities = [props.MeanIntensity]
You get:
bw =
1×14 logical array
0 1 1 1 1 1 0 0 1 1 1 0 0 0
droughtDurations =
5 3
droughtIntensities =
-2.8 -5.16666666666667
9 Kommentare
Image Analyst
am 13 Jun. 2021
OK we're getting there. So, say for a given long and lat, what if there are 5 or 10 or 15 droughts of longer than a certain duration during those 415 months? How do you convert that to a color? Do you simply sum up all the drought months over the 415 months?
Siehe auch
Kategorien
Mehr zu Historical Contests finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!