I know how to extract every nth item in an array, but what I have difficulties with is the following:
How can I extract every nth item from an array of 1800 elements, always including the first and the last element, up to a total of 256 elements?
Example:
array = [1,2,3,4,5,6,7,8,9,10];
Extract 5 elements:
extract = [1,3,5,7,10];