0

suppose that we have some vector y in matlab and let us suppose that there is such linear relationship between values of y enter image description here

of course first vector can be easily implemented by

y(L:N-1), but related to matrix, we dont have index y[0] in matlab, so how can i solve this issue? there is another picture

enter image description here

should i use index y1 and instead of index y(l-1),start from y(l)?

1 Answers1

1

Your equation is zero-based, while Matlab is one-based in terms of array indexing. Therefore, the best solution is to add 1 every index in the equation: the vector on the left hand side runs from L+1:N, instead of L:N-1, and the elements in the matrix from 1 to L or N-L (whichever is larger), instead of 0 to L-1 or N-L-1.

Bernhard
  • 3,619
  • 1
  • 25
  • 50