How do I codegen rand() so the seed is set off the clock, or otherwise not the same every time?

8 次查看(过去 30 天)
How can use codegen to make executables that don't make the same random numbers every time? rng('shuffle') and clock() are both unsupported in codegen. For example, if I just want to compile rand() into an executable and get a different number every time it is run (outside of matlab).

回答(1 个)

Honglei Chen
Honglei Chen 2016-12-1

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by