I saw your python version so I might be able to translate my RLC and phase
portrait,here it is what I am trying to do :
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import odeint
def f(y,t):
if t<25:
return [y[1],-8*y[0]+0.1*y[1]]
elif 25<t<45:
return [y[1],-8*y[0]]
else:
return [y[1],-8*y[0]-0.1*y[1]]
# Valeurs de t souhaiter
t=np.linspace(0,35,1000)
# Calcul en partant de y=0.01, y’=0
y1=odeint(f,[0.01,0],t)
plt.plot(t,y1[:,0])
plt.title("Evolution temporelle")
plt.xlabel("Temps t (s)")
plt.ylabel("Intensite i (A)")
plt.plot(0,0.01,"ro")
#plt.savefig("RLC-demarrage.eps")
plt.show()
----------------------------------------------------
plt.clf()
plt.plot(y1[:,0],y1[:,1])
plt.title("Portrait de phase")
plt.xlabel("Intensite i (A)")
plt.ylabel("Derive di/dt (A/s)")
plt.axis([-0.04,0.04,-0.125,0.125])
plt.plot(0.01,0,"ro")
#plt.savefig("portrait-demarrage.eps")
plt.show()
Le samedi 18 juin 2016 08:52:03 UTC+2, Henri Girard a écrit :
>
> HI,
> I would like to use complexphaseportrait but I can't find any examples,
> somebody can guide me to these ?
> Regards
> HG
>