TISEAN package: Difference between revisions
Jump to navigation
Jump to search
(→Tutorials: added section: testing for nonlinearity) |
(→Testing for Nonlinearity: updated with good example) |
||
Line 193: | Line 193: | ||
=== Testing for Nonlinearity === | === Testing for Nonlinearity === | ||
This section is discussed on the [http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/docs/chaospaper/ | This section is discussed on the [http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/docs/chaospaper/node35.html#SECTION00090000000000000000 TISEAN documentation page]. The focus of this section will be the function {{Codeline|surrogates}}. It uses surrogate data to determine weather data is nonlinear. Let us first create the input data which will be a stationary Gaussian linear stochastic process. It is measured by {{Codeline|s(xn) = xn^3}}. We then run it through {{Codeline|surrogates}} and plot the data. | ||
{{Code| | {{Code|Creating data from Gaussian process|<syntaxhighlight lang="octave" style="font-size:13px"> | ||
# Create | # Create Gaussian process data | ||
g = zeros (2000,1); | |||
for i = 2:2000 | |||
g(i) = 0.7 * g(i-1) + (-6 + sum (rand ([size(1), 12]), 3)); | |||
endfor | |||
# Create a measurement of it | |||
spike = g.^3; | |||
# Create the surrogate | |||
sur = surrogates (spike); | |||
# Plot the data | |||
subplot (2,1,1) | |||
plot (spike,'g'); | |||
title ("spike") | |||
# | subplot (2,1,2) | ||
plot (sur,'b'); | |||
title ("surrogate") | |||
# Plot | |||
subplot (2, | |||
title (" | |||
title (" | |||
</syntaxhighlight>}} | </syntaxhighlight>}} | ||
[[File:tisean_av_d2_out.png|400px|center]] | [[File:tisean_av_d2_out.png|400px|center]] | ||
It is crucial that the input to surro | |||
[[Category:Octave-Forge]] | [[Category:Octave-Forge]] |