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 个评论

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

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Startup and Shutdown 的更多信息

提问:

DM
2015-4-23

Community Treasure Hunt

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

Start Hunting!

Translated by