Let's say I have the following array: A = [2 4 6 8] and I want array B to be populated according to the following pattern: (entry from A)-1, entry from A, (entry from A)+1 so in this case B = [1 2 3 3 4 5 5 6 7 7 8 9]
How do I do this?
Thanks
arrays
Best Answer