Hi,
I can't get a sinusoidal like with pyplot, I got it once but I lost my
config.
Any help ?
using Sundials,ODE,Plots
pyplot(size=(300,200),leg=false,
guidefont=font(7), titlefont=font(7));
function oscillator(t, y, ydot)
ydot[1] = y[2]
ydot[2] = - 3 * y[1] - y[2] / 10
end
initial = [1.0,0.0]; # Initial conditions
t = float([0:1.125:30]); # Time steps for solution
xv = Sundials.cvode(oscillator, initial, t);
xv[1:5,:]
plot(t,xv[:,1],title="Mouvement",
bg=RGB(.2,.2,.2),
xlabel ="Temps",ylabel = "Vitesse")
vₓ=xv[:,1]
vᵥ=xv[:,2]
plot(vₓ,vᵥ,title="Mouvement",
bg=RGB(.2,.2,.2),
xlabel ="Temps",ylabel = "Vitesse")