Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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.

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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)

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Cargar más