1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
# -*- coding: utf-8 -*-
"""
Created on Thu May 7 21:31:04 2015
@author: David PREVOST
"""
# Importations de modules
import matplotlib.pyplot as plt
# Fonctions pour l'intégration numérique (méthode des trapèzes)
# Fonction trapeze
def trapeze(xi,xj,yi,yj):
#--> A COMPLETER
# Fonction integre_signal
def integre_signal(t,f,CI=0):
#--> A COMPLETER
#------------------------------------------------------------------------------
# NE PAS MODIFIER CI-DESSOUS
# Décommenter l'ensemble pour exécuter
#(sélectionner l'ensemble, cliquer droit, puis décommenter)
#------------------------------------------------------------------------------
#
##Vitesse 1 sans filtrage
#
#fi=open("Vit1.csv")
#
#t1=[]; acc1=[]
#for li in fi:
# if li[0] not in "abcdefghijklmnopqrstuvwxyz":
# li_sep=[]
# li_sep=li.split(";")
# t1.append(float(li_sep[0]))
# acc1.append(float(li_sep[1][:-1]))
#
#vit1=integre_signal(t1,acc1)
#
#plt.figure(10)
#plt.plot(t1,vit1,"k")
#
#x1=integre_signal(t1,vit1)
#
#plt.figure(20)
#plt.plot(t1,x1,"k")
#
#
##Vitesse 2 sans filtrage
#
#fi=open("Vit2.csv")
#
#t2=[]; acc2=[]
#for li in fi:
# if li[0] not in "abcdefghijklmnopqrstuvwxyz":
# li_sep=[]
# li_sep=li.split(";")
# t2.append(float(li_sep[0]))
# acc2.append(float(li_sep[1][:-1]))
#
#vit2=integre_signal(t2,acc2)
#
#plt.figure(10)
#plt.plot(t2,vit2,"g")
#
#x2=integre_signal(t2,vit2)
#
#plt.figure(20)
#plt.plot(t2,x2,"g")
#
#
##Vitesse 3 sans filtrage
#
#fi=open("Vit3.csv")
#
#t3=[]; acc3=[]
#for li in fi:
# if li[0] not in "abcdefghijklmnopqrstuvwxyz":
# li_sep=[]
# li_sep=li.split(";")
# t3.append(float(li_sep[0]))
# acc3.append(float(li_sep[1][:-1]))
#
#vit3=integre_signal(t3,acc3)
#
#plt.figure(10)
#plt.plot(t3,vit3,"r")
#
#x3=integre_signal(t3,vit3)
#
#plt.figure(20)
#plt.plot(t3,x3,"r")
#
#plt.figure(10)
#plt.xlabel('t (s)')
#plt.ylabel('V (m/s)')
#plt.figure(20)
#plt.xlabel('t (s)')
#plt.ylabel('X (m)')
#plt.show() |
Partager