Add 10th and 90th percentile line

11 Ansichten (letzte 30 Tage)
Sarah Yun
Sarah Yun am 17 Dez. 2019
Kommentiert: Steven Lord am 17 Dez. 2019
Hi,
I have timeseries temperature data for 1950 to 2010
I must add a 10th and 90th percentile trend line on a figure i.e. to highlight all temperatures outside these ranges?
I then want to display the 'outliers' in a table.
What code must I use for this?
% I plot the timeseries
figure
hold on
plot(x, y)
% How can I add the 10th and 90th horizontal line to the figure
% How can I highlight the outliers and put in a table?
I want graph to look like this:
timeseries.jpg
Thank you.

Akzeptierte Antwort

KALYAN ACHARJYA
KALYAN ACHARJYA am 17 Dez. 2019
Bearbeitet: KALYAN ACHARJYA am 17 Dez. 2019
yline here
More
yline(-2.5,'-.b','1oth percentile value');
Same for others, hope you are using R2018b or later version (if not, let me know?)
  4 Kommentare
Adam Danz
Adam Danz am 17 Dez. 2019
That only shows how to draw a horizontal line. You also need to compute the percentiles using
Steven Lord
Steven Lord am 17 Dez. 2019
The isoutlier function lets you specify percentiles where any values that fall outside those percentiles are outliers. Since you're calling plot you could set the MarkerIndices property to put markers only on the outliers. See the "Display Markers at Specific Data Points" example on the plot documentation page and use it as a model.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Time Series finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by