[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Novice question (matrix initialization)
From: |
Przemek Klosowski |
Subject: |
Novice question (matrix initialization) |
Date: |
Mon, 28 Feb 1994 13:04:16 -0500 |
Hello,
I am a complete novice to matlab language (actually I use octave). I
am playing with Savitzky-Golay filters, which are calculated from a
rather simple matrix: A(i,j) = i^j where i=-n:n and j=0:m. I can set
up this matrix by writing two loops, but I am sure that there is a
neater way, something like
AA = m columns of [-n, -n+1 ... n-1, n]
AB = 2n+1 rows of [ 0, 1, ... m-1 ]
A = AA .^ AB;
Unfortunately, only the last statement is a valid octave/matlab code.
Can anyone suggest how should I elegantly write first two lines?
- Novice question (matrix initialization),
Przemek Klosowski <=