Solved

Remove all the consonants

Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

oltre 6 anni ago

Solved

Convert a vector into a number

This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

oltre 6 anni ago

Solved

Bottles of beer

Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

oltre 6 anni ago

Solved

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...

oltre 6 anni ago

Solved

Get the length of a given vector

Given a vector x, the output y should equal the length of x.

oltre 6 anni ago

Solved

Back to basics 7 - Equal NaNs

Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

oltre 6 anni ago

Solved

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...

oltre 6 anni ago

Solved

Determine Whether an array is empty

Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

oltre 6 anni ago

Solved

Number of 1s in a binary string

Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

oltre 6 anni ago

Solved

Who knows the last digit of pi?

There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

oltre 6 anni ago

Solved

Rotate a Matrix by 90 degrees

Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

oltre 6 anni ago

Solved

Back to basics 17 - white space

Covering some basic topics I haven't seen elsewhere on Cody. Remove the trailing white spaces from the input variable

oltre 6 anni ago

Solved

Trimming Spaces

Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

oltre 6 anni ago

Solved

Back to basics 22 - Rotate a matrix

Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

oltre 6 anni ago

Solved

radius of a spherical planet

you just measured its surface area, that is the input.

oltre 6 anni ago

Solved

The Hitchhiker's Guide to MATLAB

Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

oltre 6 anni ago

Solved

Rotate a Matrix

Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

oltre 6 anni ago

Solved

Multiply a column by a row

* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

oltre 6 anni ago

Solved

Set the array elements whose value is 13 to 0

Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

oltre 6 anni ago

Solved

Number of Horns on a unicorn!

Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

oltre 6 anni ago

Solved

Replace May with April

For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

oltre 6 anni ago

Solved

Find the largest value in the 3D matrix

Given a 3D matrix, A, find the largest value. E.g. >> A = 1:9; >> A=reshape(A,[3 1 3]); >> islargest(A) ans = 9

oltre 6 anni ago

Solved

Compute a dot product of two vectors x and y

x and y are input vectors, d is a number and contains their dot product

oltre 6 anni ago

Solved

Project Euler: Problem 10, Sum of Primes

The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

oltre 6 anni ago

Solved

Back to basics 12 - Input Arguments

Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...

oltre 6 anni ago

Solved

Omit columns averages from a matrix

Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...

oltre 6 anni ago