문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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.

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

문제를 풀었습니다


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

거의 6년 전

더 보기