## [Matplotlib-users] mlab.rk4

 [Matplotlib-users] mlab.rk4 From: darkside - 2007-04-27 12:59:29 Attachments: Message as HTML ```hi everyone, I'm trying to solve a lineal differential equation system, and I,m proving with the mlab.rk4 function. The problem I've found is that if the solution if a complex number, I can't use this functin, because it doesn't accept complex number, and I can only get the real case. Have anyone treat with this problem? What do you use to solve differential equation systems? ```

 [Matplotlib-users] mlab.rk4 From: darkside - 2007-04-27 12:59:29 Attachments: Message as HTML ```hi everyone, I'm trying to solve a lineal differential equation system, and I,m proving with the mlab.rk4 function. The problem I've found is that if the solution if a complex number, I can't use this functin, because it doesn't accept complex number, and I can only get the real case. Have anyone treat with this problem? What do you use to solve differential equation systems? ```
 Re: [Matplotlib-users] mlab.rk4 From: John Hunter - 2007-04-27 14:45:40 ```On 4/27/07, darkside wrote: > hi everyone, > I'm trying to solve a lineal differential equation system, and I,m proving > with the mlab.rk4 function. > The problem I've found is that if the solution if a complex number, I can't > use this functin, because it doesn't accept complex number, and I can only > get the real case. > > Have anyone treat with this problem? > What do you use to solve differential equation systems? rk4 was something I wrote long ago to have a simple ODE integrator in case scipy wasn't installed on my system. You should be using the scipy.integrate tools ```
 Re: [Matplotlib-users] mlab.rk4 From: darkside - 2007-04-27 22:22:07 Attachments: Message as HTML ```2007/4/27, John Hunter : > > On 4/27/07, darkside wrote: > > hi everyone, > > I'm trying to solve a lineal differential equation system, and I,m > proving > > with the mlab.rk4 function. > > The problem I've found is that if the solution if a complex number, I > can't > > use this functin, because it doesn't accept complex number, and I can > only > > get the real case. > > > > Have anyone treat with this problem? > > What do you use to solve differential equation systems? > > > rk4 was something I wrote long ago to have a simple ODE integrator in > case scipy wasn't installed on my system. You should be using the > scipy.integrate tools Thank you very much!!! I used scipy.integrate tools, splitting complex and real part of the equations, and it worked so good!! I tried to use: In addition I have filed a ticket for a complex ODE solver. http://projects.scipy.org/scipy/scipy/ticket/334 But I haven't been able to compile it. It returns a lot of errors when I tried. I suposse that it's because of the fortran compiler, but I don't know. ```
 Re: [Matplotlib-users] mlab.rk4 From: Nils Wagner - 2007-04-28 07:10:52 ```On Fri, 27 Apr 2007 23:22:04 +0100 darkside wrote: > 2007/4/27, John Hunter : >> >> On 4/27/07, darkside wrote: >> > hi everyone, >> > I'm trying to solve a lineal differential equation >>system, and I,m >> proving >> > with the mlab.rk4 function. >> > The problem I've found is that if the solution if a >>complex number, I >> can't >> > use this functin, because it doesn't accept complex >>number, and I can >> only >> > get the real case. >> > >> > Have anyone treat with this problem? >> > What do you use to solve differential equation >>systems? >> >> >> rk4 was something I wrote long ago to have a simple ODE >>integrator in >> case scipy wasn't installed on my system. You should be >>using the >> scipy.integrate tools > > > Thank you very much!!! > > I used scipy.integrate tools, splitting complex and real >part of the > equations, and it worked so good!! > > I tried to use: In addition I have filed a ticket for a >complex ODE solver. > http://projects.scipy.org/scipy/scipy/ticket/334 > > But I haven't been able to compile it. It returns a lot >of errors when I > tried. I suposse that it's because of the fortran >compiler, but I don't > know. Please remove the lines in zvdemo beginning with line 121. Rename zvdemo mv zvdemo zvdemo.f 1. g77 -c zvdemo.f zvode.f 2. g77 -o test zvdemo.o zvode.o 3. ./test > test.out HTH Nils ```