Box plot into figure with another graphs

2 ビュー (過去 30 日間)
stelios loizidis
stelios loizidis 2022 年 6 月 23 日
コメント済み: stelios loizidis 2022 年 6 月 23 日
Hello,
I have a matrix with predictions (100X24). I sorted this matrix and made a plot of the confidence intervals (maximun and minimum values) with actual data (Below is the code). What I'm trying to do is add a box diagram to the plot. How is this done?
Predictions_sorted=sort(PredictionValues);
%
Q_lower = Predictions_sorted(30*0.15/2,:);
Q_upper = Predictions_sorted(30*(1-0.15/2),:);
%
figure
plot(time,ActualData,'r-',time,Q_lower,'b--',time,Q_upper,'g--');
grid
Your help is invaluable !!!
  1 件のコメント
Adam Danz
Adam Danz 2022 年 6 月 23 日
The maximum and minimum of the data does not define the confidence interval, they define the range.
Boxplot typically depict the 25th and 75th percentiles of the data and the median.

サインインしてコメントする。

採用された回答

Adam Danz
Adam Danz 2022 年 6 月 23 日
MATLAB's boxplot and boxchart are designed to create box plots from the raw data.
boxplot(Predictions_sorted)
% or
boxchart(Predicitons_sorted)
  1 件のコメント
stelios loizidis
stelios loizidis 2022 年 6 月 23 日
Okay. Understood. Thank you for your valuable help!!

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by