35 lines
1.3 KiB
Plaintext
35 lines
1.3 KiB
Plaintext
|
set terminal epslatex font 8 color dashed
|
||
|
set output './ModeleLaTeX_TP-gnuplottex-fig6.tex'
|
||
|
set format '\num{%g}'
|
||
|
set key top right Left
|
||
|
set key width 1
|
||
|
set key heigh 1
|
||
|
set key spacing 1.5
|
||
|
|
||
|
set xlabel 'Temps t (\si{\second})' # attention il faut parfois utiliser certains guillemets
|
||
|
# notamment quand on utilise la commande \si, il faut impérativement des primes '...'
|
||
|
set ylabel 'Tension U (\si{\volt})'
|
||
|
|
||
|
R = 471000
|
||
|
# Création du fit des données
|
||
|
# ---
|
||
|
# la fonction de fit
|
||
|
f(x)=9.728*exp(-(x-0.25)/a)+b
|
||
|
fit f(x) 'condo/data_condo_4.7µF_11V_471kΩ.txt' index 0 u 1:2 via a,b
|
||
|
C=a/R*1000000
|
||
|
e=(4.7-C)/4.7*100
|
||
|
title_f(a,b) = sprintf('Fit : \(\tau = RC = \SI{%.3f}{\second}\) ; \(C = \SI{%.3f}{\micro\farad}\) ; {%.1f}\%', a, C, e)
|
||
|
|
||
|
# Pour Gnuplot directement en ligne de commande
|
||
|
#plot [0.55:5][0:4] 'data_condo.txt' index 0 u 1:2
|
||
|
|
||
|
set style line 1 lt 0 lw 4
|
||
|
|
||
|
plot [0.25:5][0:12]\
|
||
|
9.728*exp(-(x-0.25)/(R*4.7e-6*1.2)) w filledc y1=0 fc rgb 'grey90' title '',\
|
||
|
9.728*exp(-(x-0.25)/(R*4.7e-6*0.8)) w filledc y1=0 fc 'white' title '',\
|
||
|
9.728*exp(-(x-0.25)/(R*4.7e-6)) ls 1 title '\(U(t)=9.78\cdot e^{-(t-0,25)/2,213}\) ; i(C)=20\%',\
|
||
|
'condo/data_condo_4.7µF_11V_471kΩ.txt' index 0 u 1:2:5:4 title '\(R=\SI{471000}{\ohm}\) ; \(C=\SI{4.7}{}\pm\SI{0.9}{\micro\farad}\) ; \(\tau=\SI{2,213}{\second}\)' pt 4 lc rgb 'grey30' w xyerrorbars,\
|
||
|
f(x) title title_f(a,b) lc 'green'
|
||
|
|