JuliaDynamics / DynamicalSystems.jl

Award winning software library for nonlinear dynamics and nonlinear timeseries analysis
https://juliadynamics.github.io/DynamicalSystemsDocs.jl/dynamicalsystems/dev/
Other
847 stars 95 forks source link

Finding Lyapunov Exponents #72

Closed samjurl closed 6 years ago

samjurl commented 6 years ago

Hi,

Excited to find this package for Julia, however I seem to run into small errors when trying to use the package with the included logistic function, and finding of Lyapunov Exponents or Max Lyapunov Exponents (with lyapunovs and lyapunov respectively). These seem to work for all other default function I have tried.

This is quite simple to explain, so please excuse me for not using your error reporting format exactly.

Using such simple examples as below, the answer is returned perfectly fine:

using DynamicalSystems ds = Systems.roessler() λ = lyapunov(ds, 10000)

Or ds = Systems.towel() λ = lyapunov(ds, 10000)

Every default function I've tried seems to work with default conditions in this manner. However using the logistic function for example:

ds = Systems.logistic() λ = lyapunov(ds, 10000)

Returns the error: DimensionMismatch("Cannot multiply two vectors")

I do not understand what causes the difference, similarly errors are encountered when trying to use lyapunovs with the logistic function which are not encountered with other default functions. (Experimenting with parameters does not seem to help.)

Plot of the orbit diagram for the logistic function using the example code on the other hand works perfectly fine.

Datseris commented 6 years ago

Thanks for the report. YEah this happened because after the restructuring of the Library I forgot to write the method for 1 dimension...

samjurl commented 6 years ago

I see, that makes sense as the error returned from lyapunovs was related to k needing to be bigger than 1 but also smaller than D, where D = 1 in this case. Ok thanks for the clarification! Kind regards.

Datseris commented 6 years ago

Closed in https://github.com/JuliaDynamics/ChaosTools.jl/pull/62

Datseris commented 6 years ago

@samjurl a new version of ChaosTools has been tagged, you can find the new feature there!

samjurl commented 6 years ago

Works great. Many thanks!