Add Me To Death (Sum sum sum)
Given certain vector, sum of the input vector, get the sum of 2 adjacent numbers in the input, and sum of the output vector (wh...
7年弱 前
解決済み
Count me in
Count the number of occurrences of the second input in the first input
Ex.
x1 = 12344455511; x2 =2; output = 1
...
Convert a vector into numbers
Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'.
Examples
x = [ 1...
7年弱 前
解決済み
Count number of words in string
Count number of words in string
Examples
'hi', answer is 1
'hi hi', answer is 2
'I enjoy cody', answer is 3
High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...
7年弱 前
解決済み
Create incrementing array
Given a and b generate an output matrix as shown in following examples:
a=2
b=5
output=[2 20 200 2000 20000]
a=4
b...