If Else Statement for the rainfall data
이전 댓글 표시
I have a time series of daily rainfall data from 1950 to 2013. I want to implement following conditions to the data if rainfall is less than 0.5 then 1 , if rainfall is between 0.5 to 1.1 then 2 otherwise 3. How to write the code for this analysis?
채택된 답변
추가 답변 (1개)
Andrei Bobrov
2015년 10월 1일
[~,~,ii]=histcounts(data_of_daily_rainfall,[-inf,.5,1.1,inf]);
y = 1:3;
out = y(ii);
카테고리
도움말 센터 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!