⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xyhisto.m

📁 一些常被用于教学或者参考的概率论的实例的源代码
💻 M
字号:
%xyhisto.m/created by PJNahin for "Duelling Idiots"(1/6/99)
%This m-file produces 20,000 values of X raised to the Y power,
%where X and Y are both uniform from 0 to 1, and independent. It
%then plots a histogram of the values using 100 bins.
%
%
rand('state',100*sum(clock))
clear z
for pair = 1:20000
   x=rand;
   y=rand;
   z(pair)=x^y;
end
hist(z,100)
xlabel('z')
ylabel('number of values per bin')
title('Fig.13.3 - Histogram of X^Y (20,000 values)')
figure(1)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -