From: James on 4 Aug 2010 17:15 Hi All, I am trying to generate a matrix that looks like this: 0 1 2 3 4 5 1 0 1 2 3 4 2 1 0 1 2 3 3 2 1 0 1 2 4 3 2 1 0 1 5 4 3 2 1 0 Can anyone think of a way to generate this matrix without a For loop? Thanks!
From: us on 4 Aug 2010 17:17 On Aug 4, 11:15 pm, "James " <jjaq...(a)lgsinnovations.com> wrote: > Hi All, > I am trying to generate a matrix that looks like this: > > 0 1 2 3 4 5 > 1 0 1 2 3 4 > 2 1 0 1 2 3 > 3 2 1 0 1 2 > 4 3 2 1 0 1 > 5 4 3 2 1 0 > > Can anyone think of a way to generate this matrix without a For loop? Thanks! one of the many solutions r=toeplitz(0:5) %{ % r = 0 1 2 3 4 5 1 0 1 2 3 4 2 1 0 1 2 3 3 2 1 0 1 2 4 3 2 1 0 1 5 4 3 2 1 0 %} us
|
Pages: 1 Prev: how to stop the logical errors Next: please i need to know how make a channel matrix |