Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...
12 months ago
Solved
Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers.
Examples:
[index1 index2] = nearestNumbers([2 5 3...
1 year ago
Solved
Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...
1 year ago
Solved
De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if
a =...
1 year ago
Solved
Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1.
Hint: use increment.
1 year ago
Solved
Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for:
A = [ 1 5 8 ]
then
B = [ 1 1 5 ...
1 year ago
Solved
Create a vector
Create a vector from 0 to n by intervals of 2.
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...