|
From: | ishi soichi |
Subject: | Re: constructing a matrix from a vector |
Date: | Wed, 19 Oct 2011 13:22:47 +0900 |
On Wed, Oct 19, 2011 at 12:02 AM, ishi soichi <address@hidden> wrote:
_______________________________________________hi. I have a question about matrices.say, we have a vector,(1 2 3)Can we construct a matrix like1 2 31 2 31 2 31 2 3?certainly it's possible if I use normal loop algorithms. But I rather use Octave capability to manipulate matrices.
soichi
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
The function you're looking for is repmat.In your example, you could do:repmat([1 2 3], [4 1])type "help repmat" for more info.Hope this helps.
[Prev in Thread] | Current Thread | [Next in Thread] |