%> @param 'dev', str 'gpu or 'cpu' to create the random Faust on CPU or GPU (by default on CPU).
%> @param 'class', str 'double' (by default) or 'single' to select the scalar type used for the Faust generated.
%> @param 'seed', int seed to initialize the PRNG used to generate the Faust factors. If 0 (default) the seed will be initialized with a random value depending of the time clock.
%>
%>
%> @retval F the random Faust.
...
...
@@ -130,6 +131,7 @@ function F = rand(M, N, varargin)
argc=length(varargin);
dev='cpu';
class='double';
seed=0;
if(argc>0)
fori=1:2:argc
if(argc>i)
...
...
@@ -185,6 +187,12 @@ function F = rand(M, N, varargin)
else
per_row=tmparg;
end
case'seed'
if(argc==i||~isscalar(tmparg)||~isreal(tmparg))
error('isscalar keyword argument is not followed by a real scalar')