Research Article

ScalaLab and GroovyLab: Comparing Scala and Groovy for Scientific Computing

Algorithm 3

x   =  rand(50, 100)
row = 5; col = 2
xr = x[1..4+row, col..4col]// take a range
xrb = x[(1..20).by(2), (1..30).by(3)]// like, x(1:2:20, 1:3:30)
x[(1..40).by(5), 1..2]  = 44.