MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   如何在MATLAB中绘制置信区间? (https://www.labfans.com/bbs/showthread.php?t=22838)

poster 2019-12-10 16:49

如何在MATLAB中绘制置信区间?
 
我想在MATLAB中绘制一些置信区间图,但是我完全不知道如何做。我将数据保存在.xls文件中。

有人可以给我提示,还是有人知道用于绘制CI的命令?


回答:
我不确定置信区间图的含义,但这是如何绘制正态分布的两侧95%CI的示例:

alpha = 0.05; % significance level mu = 10; % mean sigma = 2; % std cutoff1 = norminv(alpha, mu, sigma); cutoff2 = norminv(1-alpha, mu, sigma); x = [linspace(mu-4*sigma,cutoff1), ... linspace(cutoff1,cutoff2), ... linspace(cutoff2,mu+4*sigma)]; y = normpdf(x, mu, sigma); plot(x,y) xlo = [x(x=cutoff2)]; patch(xhi, yhi, 'b') [IMG]https://i.stack.imgur.com/N9OUn.png[/IMG]



[url=https://stackoverflow.com/questions/1600260]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 23:29

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.