[SciPy-User] Help in python
Amr Radwan
amr_or at yahoo.com
Mon Nov 29 05:26:28 EST 2010
Hello Sir,
It would be grateful if you can help me in a simple python code. I am
learning python nowadays. I have two systems of ordinary differential
equations, one of them the state functions x(u,t) and the other for the
adjoint functions psi(t,u,x)
i.e.,
state :x'=f(x,u,t) x(0) is given
adjoint : psi' = g(x,u,t) psi(T) is given where T is the final time
I want to do a loop to integrate the state system forward in time and using
the results to integrate the adjoint backward in time using scipy after
that I can add the rest of my algorithm.
I have found a code written in matlab and I did my own python code as matlab
but
I am not sure if it is right or no.
Could you please, have a look at my small code and let me know
1- whether my small code is right or no
2- in matlab solver ode45 we write something like [T,X]= ode45 so we can get
T(time) and X...how I can get this in scipy using odeint
3- matlab ode45 as scipy odeint?
I hope that I was able to explain my problem.
many thanks in advance
Amr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eg2OC_Descent.m
Type: application/octet-stream
Size: 1884 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20101129/f4d3c703/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: finalf.py
Type: application/octet-stream
Size: 1171 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20101129/f4d3c703/attachment-0001.obj>
More information about the SciPy-User
mailing list