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
> 
> 
-- 
View this message in context: 
http://old.nabble.com/duplicate-row-of-matrix-tp34394924s24193p34394994.html
Sent from the J Programming mailing list archive at Nabble.com.

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

Reply via email to