User`s guide
Mathematics
20-23
rand('twister',5489);
Note that the 'state' keyword corresponds specifically to the SWB algorithm;
it cannot be used generally to refer to the internal state of the currently active
algorithm.
• Existing code that uses the 'state' keyword to reinitialize rand in a statement such
as
rand('state',sum(100*clock))
causes rand to switch to using the SWB algorithm. You may want to use the
'twister' keyword, which resets rand but does not switch algorithms.
• Existing code that uses the 'state' keyword to save and restore the internal state of
rand in statements such as
savedState = rand('state');
... % code that uses rand
rand('state',savedState);
may no longer work as intended. Specifically, the first line of code saves the state of
the SWB generator algorithm (see the rand documentation for details). If the default
Mersenne Twister algorithm was the active one at that time, then using the saved
state in the last line does not restore the rand internal state to its original conditions.
Instead, it switches the rand algorithm to SWB. To save and restore the internal
state of the Mersenne Twister algorithm, use the 'twister' keyword.
Upgrade to BLAS Libraries
MATLAB now uses new versions of the Basic Linear Algebra Subroutine (BLAS)
libraries. For Windows, Intel Mac, and Intel processors on Linux platforms, MATLAB
supports the Intel Math Kernel Library (MKL) version 9.0. For AMD processors on Linux
platforms, MATLAB uses the AMD Core Math Library (ACML) version 3.5. For the
Solaris platform, MATLAB uses the Sun Performance Library from Sun Studio 11.
mode of Empty Array Now Returns NaN
The mode function, when operating on an empty array ([]), returns a 1-by-0 array in
previous releases, while related functions mean, median, std, and var return NaN when
given the same input. In this release, mode returns NaN for an empty array input.