It's like a reverse version of Pascal's triangle. I want to create a vector-input function named y = lastnum(vect) on Octave, that evaluate the sum of each pair of numbers in any vectors to output the single number from the evaluation loops like this
0 1 2 3 4 1 3 5 7 4 8 12 12 20 32 And the input and output would be like this,
lastnum([0 1 2 3 4]) ans = 32 I mean... is there any progresses that I can do??? You may not understand but, the reverse triangle above can guide you about my question.
I also tagged MATLAB since it has similar language. MATLAB pros may help my problem.