The operation of selection of submatrixes causes a seg-fault if
performed within a loop.
--
function getData ( matrix results, scalar request[0:8:0], bool verbose[0])
matrix treat = {}
coeff = cols(results)
coeff
# init values
if request = 0
treat = results[2,]
# coeff
elif request = 1
treat = results[3,]
# stderr
elif request = 2
treat = results[4,]
# vcv
elif request = 3
treat = results[5:4+coeff,]
endif
return matrix treat
end function
nulldata 10
matrix a = zeros(20,5)
cc = cols(a)
matrix aa = a[5:4+cc,]
aa
aa = getData( a,3)
aa
# SEGFAULT
loop for i=0..3
aa = getData( a, i)
aa
end loop
--
Cheers