A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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.

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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)

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

Charger plus