PRTools contents

PRTools manual

gendatsin

GENDATSIN

Generate sinusoidal regression data

      X = GENDATSIN(N,SIGMA)

Input
 N Number of objects to generate
 SIGMA Standard deviation of the noise

Output
 X Regression dataset

Description

Generate an artificial regression dataset [X,Y] with

      y = sin(4x) + noise. 

where noise is Gaussian distributed with standard deviation sigma.

   X = GENDATSIN(100)
  generates 100 x,y pairs with data and default noise (sigma = 0.1).

   x = (0:0.01:1)';
   y = genregsin(x,0);
  generates the true function along the x-axis, with zero noise.

See also

gendatr, gendatsinc,

PRTools contents

PRTools manual