|
|
|
|
|
|
|
|
import math as ma |
|
|
import math as ma |
|
|
len_seq = 10 |
|
|
len_seq = 10 |
|
|
def creation_sin_RNN(len_seq,tmin,tmax,n,w,a=1,b=0): |
|
|
def creation_sin_RNN(len_seq,tmin,tmax,n,w,a=1,b=0): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Datax, Datay = [], [] |
|
|
Datax, Datay = [], [] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def creation_sin(tmin,tmax,n,w,a=1,c=0): |
|
|
def creation_sin(tmin,tmax,n,w,a=1,c=0): |
|
|
|
|
|
## [tmin,tmax] intervalle de création |
|
|
|
|
|
## n nombre de poins |
|
|
|
|
|
## w pulsation |
|
|
|
|
|
## Lx= a*sin+c coordonné y des points |
|
|
|
|
|
## t coordonné x des points |
|
|
Lx=[] |
|
|
Lx=[] |
|
|
t = np.linspace(tmin,tmax,n) |
|
|
t = np.linspace(tmin,tmax,n) |
|
|
for i in t: |
|
|
for i in t: |
|
|
|
|
|
|
|
|
return(t,Lx) |
|
|
return(t,Lx) |
|
|
|
|
|
|
|
|
def creation_x_sin(tmin,tmax,n,w,a=1,b=0,c=0): |
|
|
def creation_x_sin(tmin,tmax,n,w,a=1,b=0,c=0): |
|
|
|
|
|
## [tmin,tmax] intervalle de création |
|
|
|
|
|
## n nombre de poins |
|
|
|
|
|
## w pulsation |
|
|
|
|
|
## Lx= a*x+b*sin(x)+c coordonné y des points |
|
|
|
|
|
## t coordonné x des points |
|
|
Lx=[] |
|
|
Lx=[] |
|
|
t = np.linspace(tmin,tmax,n) |
|
|
t = np.linspace(tmin,tmax,n) |
|
|
for i in t: |
|
|
for i in t: |
|
|
|
|
|
|
|
|
return(t,Lx) |
|
|
return(t,Lx) |
|
|
|
|
|
|
|
|
def creation_x_sin2(tmin,tmax,n,w,a=1,b=1,c=0): |
|
|
def creation_x_sin2(tmin,tmax,n,w,a=1,b=1,c=0): |
|
|
|
|
|
## n nombre de poins |
|
|
|
|
|
## w pulsation |
|
|
|
|
|
## Lx= a*x+b*sin(x)²+c coordonné y des points |
|
|
|
|
|
## t coordonné x des points |
|
|
Lx=[] |
|
|
Lx=[] |
|
|
t = np.linspace(tmin,tmax,n) |
|
|
t = np.linspace(tmin,tmax,n) |
|
|
for i in t: |
|
|
for i in t: |
|
|
|
|
|
|
|
|
return(t,Lx) |
|
|
return(t,Lx) |
|
|
|
|
|
|
|
|
def creation_x(tmin,tmax,n): |
|
|
def creation_x(tmin,tmax,n): |
|
|
|
|
|
|
|
|
|
|
|
## n nombre de poins |
|
|
|
|
|
## w pulsation |
|
|
|
|
|
## Lx= x coordonné y des points |
|
|
|
|
|
## t coordonné x des points |
|
|
Lx=[] |
|
|
Lx=[] |
|
|
t= np.linspace(tmin,tmax,n) |
|
|
t= np.linspace(tmin,tmax,n) |
|
|
for i in t: |
|
|
for i in t: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def creation_arctan(tmin,tmax,n): |
|
|
def creation_arctan(tmin,tmax,n): |
|
|
|
|
|
|
|
|
|
|
|
## n nombre de poins |
|
|
|
|
|
## w pulsation |
|
|
|
|
|
## Lx= arxtan(x) coordonné y des points |
|
|
|
|
|
## t coordonné x des points |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Lx=[] |
|
|
Lx=[] |
|
|
t= np.linspace(tmin,tmax,n) |
|
|
t= np.linspace(tmin,tmax,n) |
|
|
for i in t: |
|
|
for i in t: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def creation_x2(tmin,tmax,n): |
|
|
def creation_x2(tmin,tmax,n): |
|
|
|
|
|
|
|
|
|
|
|
## n nombre de poins |
|
|
|
|
|
## w pulsation |
|
|
|
|
|
## Lx= x² coordonné y des points |
|
|
|
|
|
## t coordonné x des points |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Lx=[] |
|
|
Lx=[] |
|
|
t= np.linspace(tmin,tmax,n) |
|
|
t= np.linspace(tmin,tmax,n) |
|
|
for i in t: |
|
|
for i in t: |