[TOC]

rng

Initialising the built-in random number generator

Usage

rng(seed)

Example

Input
rng(17)
rand(1,5)
rng(17)
rand(1,5)
% Different seed number
rng(16)
rand(1,5)
Output
ans = 1e-1 × 
 0.1463   4.0537   8.8335   9.2374   2.6807

ans = 1e-1 × 
 0.1463   4.0537   8.8335   9.2374   2.6807

ans = 1e-1 × 
 2.6321   9.6424   8.6923   0.1035   3.6630

Difference with MATLAB