Resuelto


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

alrededor de 6 años hace

Resuelto


Number of vertices of a hypercube
Return the number of vertices of a n-dimensional hypercube.

alrededor de 6 años hace

Resuelto


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

alrededor de 6 años hace

Resuelto


Schwarzschild radius
Compute the <http://en.wikipedia.org/wiki/Schwarzschild_radius Schwarzschild radius> for objects of mass m (kg). Use c = 299,792...

alrededor de 6 años hace

Resuelto


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

alrededor de 6 años hace

Resuelto


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

alrededor de 6 años hace

Resuelto


Parasitic numbers
Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...

alrededor de 6 años hace

Resuelto


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

alrededor de 6 años hace

Resuelto


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

alrededor de 6 años hace

Resuelto


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

alrededor de 6 años hace

Resuelto


Basic Operation with the middle number of odd matrix
# Take an odd matrix *like* 3-by-3 # Access the *middle element* of the matrix i.e in case of 3-by-3 matrix the index of the pa...

alrededor de 6 años hace

Resuelto


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

alrededor de 6 años hace

Resuelto


Test if a matrix is symmetric
Write a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.

alrededor de 6 años hace

Resuelto


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

alrededor de 6 años hace

Resuelto


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

alrededor de 6 años hace

Resuelto


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

alrededor de 6 años hace

Resuelto


2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cor...

alrededor de 6 años hace

Resuelto


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

alrededor de 6 años hace

Resuelto


expand intervals vol.2
Similar to problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528>. This is a more general case, when bounds ...

alrededor de 6 años hace

Resuelto


expand intervals
You're given a row vector of an even number of monotonically increasing integers. Each pair of consecutive integers is the lower...

alrededor de 6 años hace

Resuelto


Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...

alrededor de 6 años hace

Resuelto


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

alrededor de 6 años hace

Resuelto


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

alrededor de 6 años hace

Resuelto


Calculate the peak value of square wave
Given the peak value of sine wave, calculate corresponding peak value of square wave, if both have same RMS voltage.

alrededor de 6 años hace

Resuelto


Average of square wave
given positive and negative peak , calculate dc level, 50% duty cycle

alrededor de 6 años hace

Resuelto


convert matrix to single column
given any matrix, convert it to single column

alrededor de 6 años hace

Resuelto


find the roots of a quadratic equation
for e.g x = [ 2 -1 -3] y = [1.5 -1]

alrededor de 6 años hace

Resuelto


Weave two vectors into one
Weave the two given vectors into one as shown below. Example: If a = [1 1 1] b = [0 0 0] then y = [1 0 1 0 ...

alrededor de 6 años hace

Resuelto


calculate linear convolution two vectors
for e.g in: a = [1 2 3] b = [4 5 6] out: y = [4 13 28 27 18]

alrededor de 6 años hace

Resuelto


Calculate the integral of the polynomial
for e.g. in = [3 2 1] out = [1 1 1 0]

alrededor de 6 años hace

Cargar más