Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: attaching rows with 2 matrices
Date: Sun, 17 Oct 2010 04:01:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 29
Message-ID: <i9dse0$r0d$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1287288064 27661 172.30.248.38 (17 Oct 2010 04:01:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 17 Oct 2010 04:01:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1754672
Xref: news.mathworks.com comp.soft-sys.matlab:679062

Dear Matlab group,

I have  matrix T :

T =    
              1   5
              4   7
              6   3

I also have another one , 'U',  defined as:

n =3
U = (1: n)'
     

I'd like to know how I can attach each row of U to each individual row in T ,which should be :

V = 
                  1    1    5
                  2    1    5
                  3    1    5
                  1    4    7
                  2    4    7
                  3    4    7
                  1    6    3
                  2    6    3
                  3    6    3

need some help if possible my friends.