Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input matrix, return a matrix with all elements above a...
7ヶ月 前
解決済み
Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input matrix, generate an output matrix that consists o...
7ヶ月 前
解決済み
Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN;
output -> matrix(p*m), the same matrix where we deleted the enti...
7ヶ月 前
解決済み
Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...
7ヶ月 前
解決済み
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 = [...
7ヶ月 前
解決済み
Counting in Finnish
Sort a vector of single digit whole numbers alphabetically by their name, in Finnish.
See the Wikipedia page for <http://en.wik...
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...
Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers.
Examples:
[index1 index2] = nearestNumbers([2 5 3...
8ヶ月 前
解決済み
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 ...
8ヶ月 前
解決済み
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...
8ヶ月 前
解決済み
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 =...
8ヶ月 前
解決済み
Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...