Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
9 mois il y a
A résolu
Given two arrays, find the maximum overlap
Given two (integer) arrays s1 and s2, create a new array s3 which is as short as possible and contains both arrays.
#1
s1 = [...
9 mois il y a
A résolu
Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers.
Examples:
[index1 index2] = nearestNumbers([2 5 3...