From help-octave-request at bevo dot che dot wisc dot edu Thu Jan 23 15:59:07 2003 Subject: RE: A Simple Matrix Construction Question From: (Ted Harding) To: help-octave at bevo dot che dot wisc dot edu Cc: Craig Stoudt Date: Thu, 23 Jan 2003 21:39:09 -0000 (GMT) On 23-Jan-03 Ted Harding wrote: > On 23-Jan-03 Craig Stoudt wrote: >> There is probably a really simple way to do the >> following, but I'm suffering from a mental block. >> >> I have a row array 'Y' of arbitrary length, 1xn. >> >> I want to create an mxn matrix where all of the rows >> are the same as 'Y'. >> >> Of course, I want to do this without resorting to >> loops. >> >> Thanks in advance. > > X_mxn = ones(1,m)*Y; > > Ted. OOPS!!! X_mxn = ones(m,1)*Y; of course! Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) Fax-to-email: +44 (0)870 167 1972 Date: 23-Jan-03 Time: 21:39:09 ------------------------------ XFMail ------------------------------ ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------