Monthly Percentiles Atmospheric Data
2 views (last 30 days)
Show older comments
Hello All,
I am trying to find the most efficient way to write a chunk of code which calculates 5-95th percentiles for each month of each year over a 60-year period. For example, calculating the percentiles for temperature for January 1970 using daily data. I want to end up with an array that looks something like this:
Year Month 5th Percentile 10th Percentile 15th Percentile...95th Percentile
1970 1 -2 0 1.5
1970 2 -0.5 1.2 2.4
1970 3 etc...
So I would have year, month, and 20 columns of percentiles. What would be the most efficient way to set this up?
Thanks,
Zach
0 Comments
Answers (1)
per isakson
on 8 Aug 2013
If you have the Statistics Toolbox, search for
prctile
2 Comments
per isakson
on 8 Aug 2013
You ask two things:
- "Does this make sense? So I should have a column for year[...]"
- "most efficient way to write a chunk of code"
Yes, that makes sense. The format of the table should make it easy for the user to read it. I would not like to read the table you propose. How many years?
The design of the function depends on the format of the input data and the format of the table.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!