Skip to content
Prev 244057 / 398506 Next

How can I refer to actual (n) and previous (n-1) elements in a vector?

How about something like

v[-n] +  v[-1]

Hope this is helpful,

Dan

Daniel J. Nordlund
Washington State Department of Social and Health Services
Planning, Performance, and Accountability
Research and Data Analysis Division
Olympia, WA 98504-5204