how to find the days haven't been precipitations in a vector or a file.
1 次查看(过去 30 天)
显示 更早的评论
Need to solve this, every help would be nice, thanks.
Specially the most difficul one is to find the days when have been no precipitations.
Implement a function called computePrecipitationStats which, given the vector that contains the daily precipitations and a threshold value, returns the average daily precipitation, the standard deviation of the daily precipitations, the number of days with no precipitation and vector containing the days when the precipitation was above the specified threshold.
3 个评论
回答(1 个)
Image Analyst
2022-12-2
Hints:
v = randi([0, 5], 1, 20)
numZeros = sum(v == 0)
valuesAboveThreshold = v(v > 3) % 3 is the threshold
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!