[SciPy-User] weired results with ode solver
Oz Nahum
nahumoz at gmail.com
Sat Feb 6 14:12:00 EST 2010
AWESOME,
That is wonderful, i got this matlab conversion done in less then 1 hour.
This is absolutely great.
The behavior of array int devision is a bit funny, but after you get
used to it, it's fine.
>>> timerange=arange(1,12)
>>> timerange/2
array([0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) #this is why i got multiple values
>>> timerange/2.0
array([ 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. , 5.5])
Thank you very much. I'm trying to push forward the use of python in
our department, and this for sure will help.
Oz.
On Sat, Feb 6, 2010 at 7:58 PM, Warren Weckesser
<warren.weckesser at enthought.com> wrote:
> Oz Nahum wrote:
>
> <snip>
>>
>> from pylab import *
>> plot(timerange/86400, c[:,0], 'bo')
>> plot(timerange/86400, c[:,1], 'go')
>> plot(timerange/86400, c[:,2], 'ko')
>> show()
>>
>>
>>
>
> <snip>
>>
>> A line plot would be nice.
>>
>>
>
> P.S.
>
> To get a line plot, just change the style arguments of the plot functions.
> E.g.:
>
> plot(timerange/86400.0, c[:,0], 'b')
> plot(timerange/86400.0, c[:,1], 'g')
> plot(timerange/86400.0, c[:,2], 'k')
>
>
>
More information about the SciPy-User
mailing list