matlab 计算角度
发布网友
发布时间:2022-06-19 18:41
我来回答
共1个回答
热心网友
时间:2024-11-29 08:09
3.解:在Matlab命令框中输入:
>> y1=chi2pdf(0:0.01:10,2);
>> y2=chi2pdf(0:0.01:10,5);
>> y3=chi2pdf(0:0.01:10,8);
>> plot(0:0.01:10,y1,'r',0:0.01:10,y2,'b',0:0.01:10,y3,'g'),grid on
其中,自由度为2,5,8的卡方分布的均值和方差分别是(2,4),(5,10),(8,16)。
5.解:>> X=[5 13 17 29 80 150];
>> mean(X)%算术均值
ans =
49
>> length(X)/sum(ones(1,length(X))./X)%调和均值
ans =
15.4085
>> power(5*13*17*29*80*150,1/length(X))%几何均值
ans =
26.9664
由此可见:算术均值>几何均值>调和均值。
6.解:在Matlab命令窗口输入
>> anova1([32.33,31.28,30.35,32.14,31.75;33.24,32.56,31.49,32.67,33.04;...
33.44,32.48,33.15,32.46,32.18])
ans =
0.4220
因为p>0.05,所以认为有显著差异。
7.解:>> polyfit([3,5,6,7,8,8,9,10],[18,25,30,39,41,42,49,52],1)
ans =
5.1389 1.0278
>> plot([3,5,6,7,8,8,9,10],[18,25,30,39,41,42,49,52],'ro')
>> hold on, grid on
>> f='5.1389*t+1.0278';fplot(f,[3,10])追问大哥 这是什么啊?