I'm not clear about what you want.

You start with 4x4

You then double the rows to get 8x4

You then do something else, leaving 8x4 (?)

You then multiply by 4x2, leaving 8x2 (?)

Now you want to get back to 4x4? Do you just want to run each pair of rows together to make one row of the result?

If so,

_2 ,\ i. 8 2


Henry Rich


On 9/5/2012 6:36 PM, pascha wrote:



Henry Rich wrote:



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

Thanks
well, I want to do array by array multiplication:
so If I have i. 4 4 the result should be again a 4 x 4 or 4 x 8 matrix,
like this:
0  1   0  0
0  5   6  7
8  9   0  0
0 13 14 15

that's why I though about boxing

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to