How to create 95 and 99 percent confidence ellipses around my data

41 ビュー (過去 30 日間)
Emma
Emma 2021 年 3 月 18 日
回答済み: Rohit Pappu 2021 年 3 月 23 日
Here is my code to plot a scatter plot of the data and to plot the eign variable:
rng('default');
X = 3 + 2*randn(500,1)
Y = 2*X + 4*randn(500,1)
CoVarience= cov(X,Y)
EignValues= eig(CoVarience)
plot(EignValues,'linewidth', 2.0)
hold on
scatter(X,Y,'.')
How would I create ta function to plot he 95 and 99% confidence ellipses in the same figure as the scatter plot?

回答 (1 件)

Rohit Pappu
Rohit Pappu 2021 年 3 月 23 日
Please refer to this answer for leads on how to plot confidence ellipses

カテゴリ

Help Center および File ExchangeScatter Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by