Table of Contents Table of Contents
Previous Page  880-881 / 3581 Next Page
Information
Show Menu
Previous Page 880-881 / 3581 Next Page
Page Background

Breakout sessions

n

function mean(A)

n

local a = 0

n

for i=1, #A do

n

for j=1, #A[i] do

n

a = a + A:get(i, j)

n

end

n

end

n

return a / (#A * #A[1])

n

end

n

n

function sd(A)

n

local a = 0

n

local m = mean(A)

n

for i=1, #A do

n

for j=1, #A[i] do

n

a = a + (A:get(i, j)-m)^2

n

end

n

end

n

return math.sqrt(a / (#A * #A[1]))

n

end

n

trace = matrix.new(1, 360, |i,j| math.sin(j/57.0)^6)

n

graph.fiplot(|i| trace[1][i], 1, 360)

n

print(sd(trace))