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!