blob: 41f756036b96649a595d328b6885f86888f641cf [file] [log] [blame]
Adrià Vilanova Martínez8d6bb622023-03-30 21:23:52 +02001table <- read.table('dades/dades.txt', sep="\t", dec='.', header=TRUE)
2table$LogIntensitatReal <- log(table$IntensitatReal)
3
4fit <- lm(LogIntensitatReal~GruixMassic, data = table)
5summary(fit)
6
7svg(file='output/p1a.svg', width=6, height=5)
8plot(table$GruixMassic, table$LogIntensitatReal, xlab="Gruix màssic (mg/cm^2)", ylab="log(Intensitat · s)")
9abline(fit, col = "mediumorchid2")
10dev.off()