Re: [julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Henri Girard
Welcome to ! First thanks, because I thaught I wouldn't get out of it ! I am following python because I am a very bad programmer but I like it ! In french, we haven't yet lot of Julia's users or I haven't met them. My aim now is to try to make the portrait phase accompanying this example from

[julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Gabriel Gellner
Welcome by the way! I used to use Python a lot myself. Julia is great, but it does require a fair amount of extra learning due to its youth. I hope you get past the rocky start :) ``` using PyPlot using PyCall @pyimport scipy.integrate as integrate function f(y, t) if t < 25 return

[julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Henri Girard
y1 (odeint arrays has nothing inside) that's why there is an error but from what ? Le lundi 20 juin 2016 17:32:07 UTC+2, Henri Girard a écrit : > > I am trying to convert from python to julia, but I don't know how to use > y1=integrate.odeint(f,t), apparently I should have add a derivativ ? > >

Re: [julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Henri Girard
What do you mean to change f(y,t) ? and what is 1-base arrays ? (does it mean it starts to 1 ?) I modify my code can you ajust it if you see problems ? @pyimport scipy.integrate as integrate function fₜ(y,t) if t<25

[julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Henri Girard
Thanks for helping :) I just found a simple scipy/python odeint I could translate, here it is, I uncommented ys=array(ys),flatten(), because i don't know what that means, but the example works even without it Now I will try my other programm with your suggestion and I will see the result ?

Re: [julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Michele Zaffalon
And remember to change your f(y,t) because Julia has 1-based arrays. On Mon, Jun 20, 2016 at 9:32 PM, Michele Zaffalon < michele.zaffa...@gmail.com> wrote: > Also linspace(0.01,0) is not the same as [0.01,0] > > On Mon, Jun 20, 2016 at 8:15 PM, Henri Girard > wrote: > >>

Re: [julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Michele Zaffalon
Also linspace(0.01,0) is not the same as [0.01,0] On Mon, Jun 20, 2016 at 8:15 PM, Henri Girard wrote: > After correction still doesn't work. > I have this function from another programme which is working, i wonder if > it's not my odeint(f,y,t) which is wrong ? > > > Le

[julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Henri Girard
Sorry I forget the function and following the example it should be for me : y=[0.01,0] function on_button_press(event) t_sim = linspace(0, 50, 200) x, y = event[:xdata], event[:ydata] x₀ = [x, y] ys = integrate.odeint(f, x₀, t_sim) plt[:plot](ys[:,1], ys[:,2], "k-", markersize=10) # path

[julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Henri Girard
After correction still doesn't work. I have this function from another programme which is working, i wonder if it's not my odeint(f,y,t) which is wrong ? Le lundi 20 juin 2016 17:32:07 UTC+2, Henri Girard a écrit : > > I am trying to convert from python to julia, but I don't know how to use >