yang25107749
2008-11-29, 13:17
a=[886,864,1027,918,866,926,893,919,946,978;928,1050,928,1040,905,900,900,863,926,821;999,927,978,854,954,999,800,981,895,924;946,949,816,1100,890,886,938,916,967,651;950,852,1000,900,1006,1120,864,818,921,850;]
a =
Columns 1 through 5
886 864 1027 918 866
928 1050 928 1040 905
999 927 978 854 954
946 949 816 1100 890
950 852 1000 900 1006
Columns 6 through 10
926 893 919 946 978
900 900 863 926 821
999 800 981 895 924
886 938 916 967 651
1120 864 818 921 850
k=ceil(1.87*(length(a)-1)^0.4);
[ni,ak]=hist(a,k);
fi=ni/length(a);
mfi=cumsum(fi);
stats=[[1:k]',ak',ni',fi',mfi']
??? Error using ==> horzcat
All matrices on a row in the bracketed expression must have the
same number of rows.
hist(a)
h=findobj(gca,'Type','patch');
set(h,'FaceColer','y','EdgeColor','b')
%其实我想用矩阵a编写一个 频率分布表和频率直方图,,,,,编的有毛病啊,咋整呀
a =
Columns 1 through 5
886 864 1027 918 866
928 1050 928 1040 905
999 927 978 854 954
946 949 816 1100 890
950 852 1000 900 1006
Columns 6 through 10
926 893 919 946 978
900 900 863 926 821
999 800 981 895 924
886 938 916 967 651
1120 864 818 921 850
k=ceil(1.87*(length(a)-1)^0.4);
[ni,ak]=hist(a,k);
fi=ni/length(a);
mfi=cumsum(fi);
stats=[[1:k]',ak',ni',fi',mfi']
??? Error using ==> horzcat
All matrices on a row in the bracketed expression must have the
same number of rows.
hist(a)
h=findobj(gca,'Type','patch');
set(h,'FaceColer','y','EdgeColor','b')
%其实我想用矩阵a编写一个 频率分布表和频率直方图,,,,,编的有毛病啊,咋整呀