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...
Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...
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
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
Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed.
For example, given
s1 = 'the main event'
your ...
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...
Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have
a = [1 2 2 2 1 ...
1 year ago
Solved
Rescale Scores
Each column (except last) of matrix X contains students' scores in a course assignment or a test. The last column has a weighted...
1 year ago
Solved
Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as
y = A.ⅇ^(-λt)*cos(2πft)
where A, λ, and f are scalars and t is a vector.
...
1 year ago
Solved
Times 2 - START HERE
Try out this test problem first.
Given the variable x as your input, multiply it by two and put the result in y.
Examples:...