Scilab Function
Last update : 18/8/2006

random - filters the field through a random mask.

Calling Sequence

[field_out]=random( field_in,job,ampl[,seed])

Parameters

Description

random is a random filter with a uniform distribution. It uses standard C function rand (many consider it as a bad one, but it exists everywhere). By default random takes the random seed from the system clock, but if the result should be repeated with the same seed, the random seed (unsigned int) may be supplied as the third command line argument. The first argument may be int for the intensity or pha for the phase, the second gives the amplitude of the random phase screen (uniform distribution) in radians, or the amplitude of the intensity noise (uniformly distributed additive) normalized to the maximum intensity.

Examples

	f1=begin(0.01,1e-6,64);
	f2=random(f1,"int",1,1);
	f3=random(f2,"pha",2,1);
	field_plot(f3);
 

Author

Chen jingyuan, Gan guangyong (IAPCM, Beijing,China.)

See Also

gauss ,