longest wet and dry spell of the matrix
이전 댓글 표시
I have the following matrix a=
[99 99 0.100 0.120 0 0.500 0;
0 0 0 0 0.150 0.120 0;
0.110 0.010 0.010 0 0 0.300 0.100;
0 0.250 0 0.050 0.060 0.100 0.110;
0 0.120 0.040 0 0.500 0.750 99];
I want to find the longest wet and dry spell of the matrix of each row ( the longest days in a row that it rained and it did not rain)...
I have
i=1;1:5
d=(a(i,:)~=0 & a(i,:)<99)
the 1's form the answer tell me how many days in a row did rain but I don't know how to make a code that will return which week had the longest days in a row that it rained and it did not rain
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Detect, Extract, and Match Features에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!