noise generation
b = noisegen(pas, Tmax, sig)
real scalar, the time increment
real scalar, the final time of the interval of noise generation
real scalar, the standard deviation of the noise
noisegen() generates a Scilab function b = Noise(t)
where Noise(t) is a piecewise constant function
(constant on [k*pas, (k+1)*pas]). The value on each constant
interval are random values from i.i.d Gaussian variables of
standard deviation sig. The function is constant for t <= 0 and
t >= Tmax.
![]() |
Example #1: noisegen()
Example #2: rand()
// Plot a zero mean gaussian white noise with the variance 1. // To use a different variance, multiply rand() by the square root of the variance. t = 0:.5:30; sig = 1; // Standard deviation of the white gaussian noise noise = sig*rand(t, "normal"); plot2d2(t, noise); | ![]() | ![]() |
