i8_normal.m
来自「用于生成一个正态分布的伪随机数数值序列」· M 代码 · 共 26 行
M
26 行
function [ x, seed ] = i8_normal ( a, b, seed )%% I8_NORMAL returns a scaled pseudonormal I8.%% Modified:%% 17 July 2006%% Author:%% John Burkardt%% Parameters:%% Input, real A, the mean of the normal PDF.%% Input, real B, the standard deviation of the normal PDF.%% Input, integer SEED, a seed for the random number generator.%% Output, integer X, a sample of the standard normal PDF.%% Output, integer SEED, an updated seed for the random number generator.% x = round ( a + b * r8_normal_01 ( seed ) );
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?