Quantcast
Channel: EmotiCODE - Snippets and Source Code Search Engine
Viewing all articles
Browse latest Browse all 146

Ruby - Calculate Standard Deviation in Ruby

$
0
0
#!/usr/bin/ruby -w include Math #Data we are going to calculate stdev arrValues = [ 4.58, 4.53, 4.1, 4.05 ] fMedian = 0 arrValues.each do |fValue| fMedian += fValue end fMedian /= arrValues. ...

Viewing all articles
Browse latest Browse all 146

Trending Articles