blob: 151853a283f6a6543192a6f165351fe9c3cbe744 [file] [log] [blame]
Adrià Vilanova Martínez52e98432023-03-20 20:00:28 +01001library(tikzDevice)
2
3table <- read.table('../dades/fons_a.txt', sep="\t", dec=',', header=TRUE)
4m = mean(table$ImpulsesPerSecond)
5m
6unc = sd(table$ImpulsesPerSecond)
7unc
8
9tikz("fons_fluctuacio.tex", width = 5, height = 4)
10plot(table$t, table$ImpulsesPerSecond, pch = 4, xlab = "$t$ (s)", ylim = c(-2.1, 2.1), ylab = "$I$ (\\#/s)")
11abline(h = m + unc, col = "red", lty = 2)
12abline(h = m - unc, col = "red", lty = 2)
13abline(h = m, col = "green", lty = 2)
14dev.off()