首页 > 编程知识 正文

matlab怎么设置函数的区间,matlab函数的默认参数

时间:2023-05-03 05:09:45 阅读:266651 作者:3580

Matlab中有关boxplot(X)命令的解释:boxplot(X) produces a box and whisker plot for each column of the matrix X. The box has linesat the lower quartile, median, and upper quartile values. Whiskers extend from each end of the box to the adjacent values in the data—by default, the most extreme values within 1.5 times the interquartile range from the ends of the box. Outliers are data with values 幸福的百褶裙 the ends of the whiskers. Outliers are displayed with a red + sign.

格式boxplot(X) %产生矩阵X的每一列的盒图和“须”图,“须”是从盒的尾部延伸出来,并表示盒外数据长度的线,如果“须”的外面没有数据,则在“须”的底部有一个点。boxplot(X,notch) %当notch=1时,产生一凹盒图,notch=0时产生一矩箱图。boxplot(X,notch,'sym') %sym表示图形符号,默认值为“+”。boxplot(X,notch,'sym',vert) %当vert=0时,生成水平盒图,vert=1时,生成竖直盒图(默认值vert=1)。boxplot(X,notch,'sym',vert,whis) %whis定义“须”图的长度,默认值为1.5,若whis=0则boxplot函数通过绘制sym符号图来显示盒外的所有数据值。

Examples 1

The following commands create a box plot of car mileage grouped by country.

load carsmall

boxplot(MPG,Origin)

Exa快三技巧准确率100图。boxplot(X,notch,'sym') %sym表示图形符号,默认值为“+”。boxplot(X,notch,'sym',vert) %当vert=0时,生成水平盒图,vert=1时,生成竖直盒图(默认值vert=1)。boxplot(X,notch,'sym',vert,whis) %whis定义“须”图的长度,默认值为1.5,若whis=0则boxplot函数通过绘制sym符号图来显示盒外的所有数据值。

Examples 1

The following commands create a box plot of car mileage grouped by country.

load carsmall

boxplot(MPG,Origin)

Examples 2The following example produces notched box plots for two groups of sample data.

x1 = normrnd(5,1,100,1);

x2 = normrnd(6,1,100,1);

boxplot([x1,x2],'notch','on')

Examples 3

x1 = normrnd(5,1,100,1);

x2 = normrnd(6,1,100,1);

boxplot([x1,x2])

The difference between the medians of the two groups is approximately 1.Since the notches in the boxplot do not overlap, you can conclude, with 95% confidence, that the true medians do differ.

Examples 4

The following figure shows the boxplot for same data with the length of the whiskers specified as 1.0 times the interquartile range. Points 幸福的百褶裙 the whiskers are displayed using +.

x1 = normrnd(5,1,100,1); x2 = normrnd(6,1,100,1); boxplot([x1,x2],'notch','on','whisker',1)

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。