Clear Filters
Clear Filters

how to calculate the maximum consecutive dry days and wet days over time period?

12 views (last 30 days)
I have matrix (189x189) of daily precipitation in 20 years period (7300 files). I want to calculate the consecutive dry days and wet days in that period, where dry days is RR<1 and wet days is RR>1. can any one help me about this problem?

Accepted Answer

AbhimanyuSingh
AbhimanyuSingh on 9 Aug 2017
RR=randi([-255,255],189,189); % Prepare a random precipitation data %Assumption that RR is matrices of 189x189 and containing precipitation data if this assumption is correct then below mentioned steps will work dryDays=RR<1; noOfDryDays=find(dryDays); noOfWetDays=find(~dryDays);
Or Else First you need to import data in a variable then use above code snippets
  3 Comments
Koyel Sur
Koyel Sur on 21 May 2018
Edited: Koyel Sur on 21 May 2018
The above attached codes are not working
error in this line[StartDay,Enddate,maxdryconsDay]=ConsecutiveCalcDays(noOfDryDays). Kindly solve

Sign in to comment.

More Answers (0)

Categories

Find more on Dates and Time in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!