|
|
First we define some functions in Cython, so people can subclass Function and add new 1D maps. The orbit function iterates the function f N times and returns the value. It is used for plotting bifurcation and can also be used if you want to; skip the transient part. trajectory is a function that iterates N times and keeps the itterates in a list which is returned- This is used for plotting time series of (x_n,n): Both are used in more advanced analysis for for calculating Liapunov value and Feigenbaums invariant \delta_i
|
__sagenb_s...6_code_sage14_spyx.c   __sagenb_s...ode_sage14_spyx.html   __sagenb_s..._6_code_sage2_spyx.c   __sagenb_s...code_sage2_spyx.html
|
([x == (k - 1)/k, x == 0], [x == 0, x == 1], -(x - 1)*k - k*x) ([x == (k - 1)/k, x == 0], [x == 0, x == 1], -(x - 1)*k - k*x) |
Traceback (click to the left of this block for traceback) ... SyntaxError: invalid syntax Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_29.py", line 10, in <module>
exec compile(u"print _support_.syseval(python, u'(orbit(LogisticMap(),k,2,0) -2', __SAGE_TMP_DIR__)" + '\n', '', 'single')
File "", line 1, in <module>
File "/sagenb/sage_install/sage-4.7/devel/rkirov-flask/sagenb/misc/support.py", line 473, in syseval
return system.eval(cmd, sage_globals, locals = sage_globals)
File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/site-packages/sage/misc/python.py", line 53, in eval
eval(compile(s, '', 'exec'), globals, globals)
File "", line 3
(orbit(LogisticMap(),k,2,0) -2
^
SyntaxError: invalid syntax
|
|
|
|
|
|
|
|
|
|
|
|
|
0.22631731805389263 0.22631731805389263 |
|
|
|
|
Click to the left again to hide and once more to show the dynamic interactive window |
|
|
|
|
|
|
|
|
|
|
Click to the left again to hide and once more to show the dynamic interactive window |
Traceback (click to the left of this block for traceback) ... in Python, and has the wrong precedence. Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_27.py", line 10, in <module>
exec compile(u'print _support_.syseval(python, u"var(\'x,y,a,b\')\\nhenon= matrix([[1+y-a*x^2],[b*x]]) \\nhj = jacobian(henon, (x,y))", __SAGE_TMP_DIR__)
File "", line 1, in <module>
File "/sagenb/sage_install/sage-4.7/devel/rkirov-flask/sagenb/misc/support.py", line 473, in syseval
return system.eval(cmd, sage_globals, locals = sage_globals)
File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/site-packages/sage/misc/python.py", line 53, in eval
eval(compile(s, '', 'exec'), globals, globals)
File "", line 2, in <module>
File "element.pyx", line 699, in sage.structure.element.Element.__xor__ (sage/structure/element.c:5309)
RuntimeError: Use ** for exponentiation, not '^', which means xor
in Python, and has the wrong precedence.
|
Traceback (click to the left of this block for traceback) ... NameError: name 'hj' is not defined Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_26.py", line 10, in <module>
exec compile(u"print _support_.syseval(python, u'det(hj)', __SAGE_TMP_DIR__)" + '\n', '', 'single')
File "", line 1, in <module>
File "/sagenb/sage_install/sage-4.7/devel/rkirov-flask/sagenb/misc/support.py", line 473, in syseval
return system.eval(cmd, sage_globals, locals = sage_globals)
File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/site-packages/sage/misc/python.py", line 56, in eval
eval(z, globals)
File "", line 1, in <module>
NameError: name 'hj' is not defined
|
|
|