Open in the MATLAB editor: g05kf_example
function g05kf_example fprintf('g05kf example results\n\n'); % Initialize the seed seed = [int64(1762543)]; % genid and subid identify the base generator genid = int64(1); subid = int64(1); % Initialize the generator to a repeatable sequence [state, ifail] = g05kf( ... genid, subid, seed); % The number of pseudorandom numbers to be generated n = int64(5); % Generate the variates [state, x, ifail] = g05sa( ... n, state); % Display variates disp(x);
g05kf example results 0.6364 0.1065 0.7460 0.7983 0.1046