[SciPy-User] Help in python

Amr Radwan amr_or@yahoo....
Mon Nov 29 04:26:28 CST 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)
 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  

 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

-------------- 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-0002.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-0003.obj 

More information about the SciPy-User mailing list