Vector where elements equals previous elements + 1
3 views (last 30 days)
I wish to make a column vector where ecah element eqaul the previous element + 1. I also want to be able to decide by a loop how mane elements the vector should contain. Example: start =1;end=1 should give the vector [1}. start=1;end=3 should give the vector [1 2 3]. I hope someone has an idea about how to solve this.