Solved


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

12 years ago

Solved


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

12 years ago

Solved


Construct a string from letters and counts
Given two input arrays like this: [5,3,1] ['a','b','c'] Output a string that contains each letter the specified num...

12 years ago

Solved


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

12 years ago

Solved


Number Persistence
A number's persistence is the number of steps required to reduce it to a single digit by multiplying all its digits to obtain a ...

12 years ago

Solved


Guess the Coefficients!
Given a polynomial _p_ known to have positive integer coefficients, deduce the values of the coefficients. For example: ...

12 years ago

Solved


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

12 years ago

Solved


Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

12 years ago

Solved


Continued fractions
Find a <http://en.wikipedia.org/wiki/Continued_fraction continued fraction> approximation of x.

12 years ago

Solved


Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

12 years ago

Solved


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

12 years ago

Solved


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

12 years ago

Solved


Basics: Divide integers to get integer outputs in all cases
Divide integers a and b in such a way that output y is always an integer (in ceil manner)

12 years ago

Solved


Sort (high on middle, low on ends)
Sort the vector of numbers in order low-high-low. Even numbers appear in ascending order on the left and odd numbers appear in d...

12 years ago

Solved


COUNT LETTERS
Count the number of letters in a given string. For Example: STR='The MAtlAb code'; output:T 2 H 1 E 2 M 1 A 2 L 1 B 1 C ...

12 years ago

Solved


Make a list string
Given a cell string, produce a string separating the items with spaces and commas and with an 'and' preceding the final item, an...

12 years ago

Solved


Is there a GPU Device?
Return true if there is a supported GPU device available on the Cody computer.

12 years ago

Solved


Find the next prime number
Find the next prime number or numbers for given n. For example: n = 1; out = 2; or n = [5 7]; out = [7 11]; ...

12 years ago

Solved


Diagonal & Anti-Diagonal Matrix: Easy
Create a matrix as shown below from "magic" square. For example: if input x=9;then use mgic(x) and create the matrix...

12 years ago

Solved


Concatenate matrix into 4 quadrants for given number of iteration
If given a matrix and number, output should be its concatenation like wavelet for given number of iterations. Example a ...

12 years ago

Solved


Ohm's Law
Well its Ohm's law... So V = IR! I will give two of the three values, such as V and I or I and R and you have to return th...

12 years ago

Solved


Numeric array to cell array of strings (easy)
Given a numeric array (A) and a 1xk cell array of strings (C), return a cell array (B) that is the same size as A and in which e...

12 years ago

Solved


The sum of individual numbers...
Well this one is taking a number and then summing the individual parts till you reach a value of 1, 2, 3, 4, 5, 6, 7, 8, 9, or 0...

12 years ago

Solved


Cofactor
Given a matrix, find the cofactor of the element in 'i'th row and 'j'th column.

12 years ago

Solved


Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

12 years ago

Solved


Numbers in extended form
Shhhhhhh. Don't tell my daddy, but I'm borrowing his Cody account so all of you very smart people can help me out. I just star...

12 years ago

Solved


MiniMax
Find the smallest value in array, which is the maximum of its row and column. Example: in array shown below are two numbers w...

12 years ago

Solved


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

12 years ago

Solved


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

12 years ago

Solved


Signed Magnitude
For a given input vector, return the value that is furthest from zero. For example, if x = [1 2 -12] return -12.

12 years ago

Load more