how to calculate the maximum consecutive dry days and wet days over time period?
조회 수: 8 (최근 30일)
이전 댓글 표시
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?
채택된 답변
AbhimanyuSingh
2017년 8월 9일
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
AbhimanyuSingh
2017년 8월 10일
Please find attached two '.m' files it will help you to find the maximum no. of the consecutive day.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Standard File Formats에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!