Cannot set the normal transformation algorithm for the legacy generator
Cannot set the normal transformation algorithm for the legacy generator
Cannot set the normal transformation algorithm for the legacy generator
Re: Cannot set the normal transformation algorithm for the legacy generator
The most common way to use a settings structure is to restore the generator state. However, because the structure contains not only the state, but also the generator type and seed, it's also a convenient way to temporarily switch generator types. For example, if you need to create values using one of the legacy generators from MATLAB 5.0, you can save the current settings at the same time that you switch to use the old generator ...
and then restore the original settings later.
You should not modify the contents of any of the fields in a settings structure. In particular, you should not construct your own state vector, or even depend on the format of the generator state.
Code: Select all
previousSettings = rng(0,'v5uniform')
and then restore the original settings later.
Code: Select all
rng(previousSettings)
Who is online
Users browsing this forum: No registered users and 4 guests