Displaying 1 result from an estimated 1 matches for "p1sampnum".
2010 Nov 04
1
Best Fit line trouble with rsruby
...39;t work.
I then tried something like this, as I thought the conversion from the array
to the string in the assign function was causing the problem with the best
fit line.
graphData = RSRuby.instance
graphData.png("/code/Beer's-Law Graph.png")
concentration = graphData.c(p1Conc[0..(p1SampNum - 1)])
absorbance = graphData.c(p1AbsorbanceArray[0..(p1SampNum - 1)])
fit = graphData.lm(concentration ~ absorbance)
graphData.plot(concentration, absorbance)
graphData.abline(fit["coefficients"]["(Intercept)"],
fit["coefficients"][absorbance])
puts fit["coeffici...