x=rand(1,5000); h=0:0.1:1 %dobre zobrazenie hist(x) shg %zle lebo na okrajoch zoberie len polovicu hodnot preto treba urcit stredy hist(x,h) shg %stredy s=(h(1:end-1)+h(2:end))/2 s = Columns 1 through 8 0.0500 0.1500 0.2500 0.3500 0.4500 0.5500 0.6500 0.7500 Columns 9 through 10 0.8500 0.9500 % dobre zobrazenie >> hist(x,s)