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