~ubuntu-branches/debian/sid/octave-tisean/sid

« back to all changes in this revision

Viewing changes to tests/addnoise/procedure.txt

  • Committer: Package Import Robot
  • Author(s): Rafael Laboissiere
  • Date: 2017-08-14 12:53:47 UTC
  • Revision ID: package-import@ubuntu.com-20170814125347-ju5owr4dggr53a2n
Tags: upstream-0.2.3
ImportĀ upstreamĀ versionĀ 0.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
As 'addnoise' simply adds noise to the input vector, it can be easily replaced with GNU Octave functions.
 
2
 
 
3
So to replace the following command in Octave:
 
4
    $ addnoise data.dat -v0.02 -u -o "data_noise.dat"
 
5
 
 
6
    r = std (data) * 0.02;
 
7
    data = data + r * rand (size (data))
 
8
 
 
9
 
 
10
To replace the following command in Octave:
 
11
    $ addnoise data.dat -r0.5 -o "data_noise.dat"
 
12
 
 
13
    g = (-6 + sum (rand ([size(data), 12]), 3));    
 
14
    data = data + 0.5 * g
 
15