Clear Filters
Clear Filters

persistent init and rng

2 views (last 30 days)
DM on 23 Apr 2015
Commented: Image Analyst on 23 Apr 2015
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;
  1 Comment
Image Analyst
Image Analyst on 23 Apr 2015
Which function? If you say "doc rng" (or whatever function you want), does it bring up the help?

Sign in to comment.

Answers (0)


Find more on Random Number Generation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!