On 9/5/2012 6:18 PM, pascha wrote:
sorry for quick posts by me.. I am newbie in J I want to solve a linear system of equation and I want to get a desirable design matrix for the equation considering a simple case of 4 x 4 matrix i. 4 4: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 could you give a strategy to duplicate each row and get a 8 x 4 matrix, e.g. : 0 1 2 3 0 1 2 3 4 5 6 7 4 5 6 7 8 9 10 11 8 9 10 11 12 13 14 15 12 13 14 15
Just do 2 # mtx
At the end for each duplicate array I want to multiply them by another 2 x 4 matrix (say, 1 1 0 0,. 0 1 1 1) and get the final design matrix. Is the solution come with the concept of boxing in this situation?
Boxing may not be needed. Matrix multiply is +/ . * and you can just mp =: +/ . * mtx mp (1 1 0 0,. 0 1 1 1) Henry Rich
Pascha
---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm