Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.2 - Русский

Change language to:
English - Français - 日本語 - Português -

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
However, this page did not exist in the previous stable version.

Справка Scilab >> CACSD > noisegen

noisegen

noise generation

Syntax

b = noisegen(pas, Tmax, sig)

Arguments

pas

real scalar, the time increment

Tmax

real scalar, the final time of the interval of noise generation

sig

real scalar, the standard deviation of the noise

Description

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.

Note: Random number generator functions such as rand and grand are another alternative to generate noises from a wide variety of probability distribution (see example 2 below).

Examples

Example #1: noisegen()

noisegen(0.5, 30, 1.0);
x = -5:0.01:35;
y = feval(x, Noise);
plot(x, y);

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);

See also

  • rand — Случайные числа
  • grand — Случайные числа
Report an issue
<< Model Transformation CACSD prbs_a >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Feb 14 15:04:58 CET 2019