I would like to submit a question relative to a script ...
I'm not yet very familiar with matrix but instead of using a matrix, try to create two series -- a_vect and p_vect (such as <genr series a_vect>-- and you can join both of them in a matrix after exiting the loop ! That's what I do at least at it works!