persistent init and rng

I found the following command in a built in function in MATLAB, can anyone please explain to me what they mean?
persistent init;
if isempty(init)
init = 1;
rng(seed);
end
Thanks

1 Comment

Which function? If you say "doc rng" (or whatever function you want), does it bring up the help?

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB Coder in Help Center and File Exchange

Asked:

DM
on 23 Apr 2015

Commented:

on 23 Apr 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!