如何用MATLAB做数据正态分布拟合图像
83.0136792575.3419811358.57576.8417452880.192581.9507075571.6979.5868.7556176.0926857...
83.01367925
75.34198113
58.575
76.84174528
80.1925
81.95070755
71.69
79.58
68.755
61
76.092685
74.025
75.35867925
66.7575
72.1775
74.54622642
79.03443396
86.72830189
71.43278302
72.41
70.06509434
72.735
84.46462264
73.42830189
64.47241379
72.50943396
76.4075
77.18207547
81.0171725
82.75113208
85.305
70.655
66.64198113
68.1
84.55400943
82.73
22.05263158
75.42358491
64.91084906
72.81556604
85.07641509
75.985
68.1275
81.39075472
55.645
63.265
75.67264151
62.84339623
71.4009434
74.40330189
68.33018868
80.89622642
79.99
72.20754717
48.20454545
68.54056604
85.095
76.94080189
70.96084906
72.765
78.52754717
75.33
73.145
82.50566038
75.7254717
76.36
79.03962264 例如让面的一组数据如何用MATLAB拟合成正态分布图形 展开
75.34198113
58.575
76.84174528
80.1925
81.95070755
71.69
79.58
68.755
61
76.092685
74.025
75.35867925
66.7575
72.1775
74.54622642
79.03443396
86.72830189
71.43278302
72.41
70.06509434
72.735
84.46462264
73.42830189
64.47241379
72.50943396
76.4075
77.18207547
81.0171725
82.75113208
85.305
70.655
66.64198113
68.1
84.55400943
82.73
22.05263158
75.42358491
64.91084906
72.81556604
85.07641509
75.985
68.1275
81.39075472
55.645
63.265
75.67264151
62.84339623
71.4009434
74.40330189
68.33018868
80.89622642
79.99
72.20754717
48.20454545
68.54056604
85.095
76.94080189
70.96084906
72.765
78.52754717
75.33
73.145
82.50566038
75.7254717
76.36
79.03962264 例如让面的一组数据如何用MATLAB拟合成正态分布图形 展开
展开全部
1、首先,确定所绘制图表是哪种拟合函数?比如拟合正态分布函数等。
例、根据实验得出一份数据,要判断是不是其是服从哪种分布,将其转换为柱状图应该最为直观了。部分数据截图,如图所示,
2、、将数据一定的规则分组,比如距离范围等,也就是将相似的数据归为一类,并记录这一组的频数(个数)。如图部分组数据所示,
3、数据准备好之后,接下来就是绘制柱状图,简单的Matlab代码和柱状图,如图所示,
4、由画出的柱状图可知,此数据近似服从正态分布。则根据原始数据计算出正态分布的关键数值为:均值,方差,标准差。
5、f = @(x) normpdf(x,均值,标准差),概率密度f*总数等于拟合的的频数,则拟合的图形,如图所示,
6、拟合图绘制好以后,就是设置横纵坐标轴,如图所示,
7、另外如果想要画频率概率图,方法类似只需要将,频数除以总数得出频率即可,正态分布f(x)就是概率。
展开全部
data=[83.01367925
75.34198113
58.575
76.84174528
80.1925
81.95070755
71.69
79.58
68.755
61
76.092685
74.025
75.35867925
66.7575
72.1775
74.54622642
79.03443396
86.72830189
71.43278302
72.41
70.06509434
72.735
84.46462264
73.42830189
64.47241379
72.50943396
76.4075
77.18207547
81.0171725
82.75113208
85.305
70.655
66.64198113
68.1
84.55400943
82.73
22.05263158
75.42358491
64.91084906
72.81556604
85.07641509
75.985
68.1275
81.39075472
55.645
63.265
75.67264151
62.84339623
71.4009434
74.40330189
68.33018868
80.89622642
79.99
72.20754717
48.20454545
68.54056604
85.095
76.94080189
70.96084906
72.765
78.52754717
75.33
73.145
82.50566038
75.7254717
76.36
79.03962264];
[mu,sigma]=normfit(data);
[y,x]=hist(data,35);
bar(x,y,'FaceColor','r','EdgeColor','w');box off
xlim([mu-3*sigma,mu+3*sigma])
a2=axes;
ezplot(@(x)normpdf(x,mu,sigma),[mu-3*sigma,mu+3*sigma])
set(a2,'box','off','yaxislocation','right','color','none')
title '频数直方图与正态分布密度函数(拟合)'
75.34198113
58.575
76.84174528
80.1925
81.95070755
71.69
79.58
68.755
61
76.092685
74.025
75.35867925
66.7575
72.1775
74.54622642
79.03443396
86.72830189
71.43278302
72.41
70.06509434
72.735
84.46462264
73.42830189
64.47241379
72.50943396
76.4075
77.18207547
81.0171725
82.75113208
85.305
70.655
66.64198113
68.1
84.55400943
82.73
22.05263158
75.42358491
64.91084906
72.81556604
85.07641509
75.985
68.1275
81.39075472
55.645
63.265
75.67264151
62.84339623
71.4009434
74.40330189
68.33018868
80.89622642
79.99
72.20754717
48.20454545
68.54056604
85.095
76.94080189
70.96084906
72.765
78.52754717
75.33
73.145
82.50566038
75.7254717
76.36
79.03962264];
[mu,sigma]=normfit(data);
[y,x]=hist(data,35);
bar(x,y,'FaceColor','r','EdgeColor','w');box off
xlim([mu-3*sigma,mu+3*sigma])
a2=axes;
ezplot(@(x)normpdf(x,mu,sigma),[mu-3*sigma,mu+3*sigma])
set(a2,'box','off','yaxislocation','right','color','none')
title '频数直方图与正态分布密度函数(拟合)'
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
象正交实验的数据,不适合拟合成曲面,不信你看图形。用regress回归就可以了。
clc;clear
a=[...
0
0
188
0
1
301
0
2
330
0
3
232
0
4
166
1
0
258
1
1
3182
1
2
4785
1
3
1048
1
4
243
2
0
1036
2
1
14960
2
2
19742
2
3
6098
2
4
432
3
0
2061
3
1
11431
3
2
15531
3
3
4055
3
4
324
4
0
294
4
1
444
4
2
2137
4
3
712
4
4
163]
x=a(:,1),y=a(:,2),z=a(:,3)
plot3(x,y,z),grid
clc;clear
a=[...
0
0
188
0
1
301
0
2
330
0
3
232
0
4
166
1
0
258
1
1
3182
1
2
4785
1
3
1048
1
4
243
2
0
1036
2
1
14960
2
2
19742
2
3
6098
2
4
432
3
0
2061
3
1
11431
3
2
15531
3
3
4055
3
4
324
4
0
294
4
1
444
4
2
2137
4
3
712
4
4
163]
x=a(:,1),y=a(:,2),z=a(:,3)
plot3(x,y,z),grid
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询