Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -0,0 +1,18 @@
|
|||
require "table2"
|
||||
local fmt = require "fmt"
|
||||
|
||||
local function cum_std_dev(a)
|
||||
for i = 1, #a do
|
||||
local b = a:slice(1, i)
|
||||
fmt.print("Values : %,s", b)
|
||||
coroutine.yield(b:stddev())
|
||||
end
|
||||
end
|
||||
|
||||
local a = {2, 4, 4, 4, 5, 5, 7, 9}
|
||||
local co = coroutine.create(cum_std_dev)
|
||||
while true do
|
||||
local _, sd = coroutine.resume(co, a)
|
||||
if !sd then break end
|
||||
fmt.print("Std Dev : %10.8f\n", sd)
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue