Pastebin
Retrouvez, créez et partagez vos snippets en temps réel.
Rechercher un Pastebin
Aucun paste trouvé.
Créer un paste
Pastebin
Blog
squeezie
# Créé par profsos, le 21/11/2025 en Python 3.7 import matplotlib.pyplot as plt from scipy import stats import numpy as np kc=42e-3 from scipy.optimize import curve_fit Lu=[5,5.5,6,6.5,7,7.5] Li=[0.87,0.95,1.03,1.12,1.21,1.28] Lw=[31.8,123.1,180.2,263.6,329.9,380.8] Lc=[kc*e for e in Li] print(Lc) '''plt.plot(Lw,Lc,"ro") plt.xlabel('Wm en rad/s') plt.ylabel('Cm en Nm') ''' a,b,r,p,std_err = stats.linregress(Lw,Lc) Lc_th=[a*e+b for e in Lw] #plt.plot(Lw,Lc_th,"g*") print('f= ',a,'\n','Cfs = ' ,b) #plt.show() F=a #fmesure= open("RobotEriccMesureTemp_30.csv","r") Lt,L30=np.loadtxt('RobotEriccMesureTemp_30.csv',skiprows=1,unpack=True) plt.plot(Lt,L30) def f(x,K,Tau): return 3*K*(1-np.exp(-x/Tau)) (K,Tau), cov = curve_fit(f,Lt, L30) print (K,Tau) print(cov) err = np.sqrt (np.diag (cov)) print(err) L__8=[f(x,K,Tau) for x in Lt] plt.plot(Lt,L__8) plt.show() Jeq= Tau*F print('Jeq: ', Jeq)
Créé il y a 1 mois.