That's the way I do it right now. But I think it could not be the best solution because it requires a lot of processor time and memory. I have to do it while data acquisition so it should be a lean solution. Moreover, matrix manipulations like addition or multiplication of rows is a mathematical standard and should be available for matrix classes.