문제를 풀었습니다


Iterative sum of digits of 2^n number
Given n, calculate the number 2^n (where n>=0) and iterate until the sum of the digits is a single-digit number. Example: Inp...

3개월 전

문제를 풀었습니다


Fast 1-D Convolution (full shape)
This is the first problem in the <http://www.mathworks.com/matlabcentral/cody/?term=Fast+1-D+Convolution fast 1-D convolution se...

3개월 전

문제를 풀었습니다


One-hot encoding

3개월 전

문제를 풀었습니다


Vector addition
Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

3개월 전

문제를 풀었습니다


Geometrical meaning of determinant
Given two vectors x,y, in 2D or three vectors x,y,z in 3D space, compute the area (or volume) of the parallelogram they define. ...

3개월 전

문제를 풀었습니다


Angle difference between Hour Hand and Minute Hand of clock
*Calculate the difference of angles between Hour hand and Minute hand of clock* E.g. 1) At 12:00 Angle Difference = 0 deg...

3개월 전

문제를 풀었습니다


Is my wife really right?
For every input, output the string 'yes' once. Example: [yes1, yes2] = YesSheIs('Am I right?', 'Do you love me?') yes1 = 'yes'...

3개월 전

문제를 풀었습니다


This is a palindrome and so am I
A palindrome is a sequence of characters which reads the same backward or forward, for instance 'a man a plan a canal panama'...

3개월 전

문제를 풀었습니다


Cubic Integer Constrained Solution
Find an integral non-trivial solution (x,y,z ~=0) (x=0 or y=0 or z=0 are trivial) for the cubic equation 987,654,321x + 123,45...

3개월 전

문제를 풀었습니다


Pascal's triangle
<https://en.wikipedia.org/wiki/Pascal%27s_triangle> if the order is: x = 3; the output will be: output = [0 0 0 1 0 0 ...

3개월 전

문제를 풀었습니다


Fill a zeros matrix (★★★★★)
(Copy of Problem 830) The aim is to fill an array of all zeros given a numerical value and the index of row and columns for t...

3개월 전

문제를 풀었습니다


bad colorimeter?
You have tested one good and one bad colorimeters with a colored solution at two path lengths of light and recorded transmittanc...

3개월 전

문제를 풀었습니다


house of cards
How many cards do one need to build a house of cards with n stages? Short explanation: /\ 2 cards for 1 stage ...

3개월 전

문제를 풀었습니다


Find: Faster Alternatives for Large Sorted/Unique Vectors
The Challenge is to create faster Find methods for large unique ascending vectors. Methods exist that are 1000 times faster t...

3개월 전

문제를 풀었습니다


Repeat Vector Values an Arbitrary Number of Times
Given two vectors of the same size, repeat the values of the first vector the number of times given in a second vector. For exam...

3개월 전

문제를 풀었습니다


Rotate Matrix Clockwise (45 Degree)
Matrix (3x3 only) rotation clockwise: 2 inputs: x matrix and n times. output: y matrix with n x 45 degree rotation.

3개월 전

문제를 풀었습니다


Find names/words that start and end with the same letter.
Find names/words (from a string) that start and end with the same letter. * Case-insensitive. * If a name/word is not at the...

3개월 전

문제를 풀었습니다


Miles to go before I sleep
Recently, my car's odometer passed 56789. Given an odometer reading, output how many miles need to be driven to get the next mi...

3개월 전

문제를 풀었습니다


Median computation (★★★)
See easy edition of this problem. However, now you must compute the median of any real-valued vector without using the in-built...

3개월 전

문제를 풀었습니다


Calculate geostrophic current
eta0=0.01; R=300; f=0.01; g=9.81; x=-500:50:500; y=-500:50:500; [x y]=meshgrid(x,y); eta=eta0*exp(-(x.^2+...

3개월 전

문제를 풀었습니다


Finger Counting
Just counting numbers using fingers. First all my ten fingers are closed. I will say 1 and open my one finger. Likewise for 6...

3개월 전

문제를 풀었습니다


Draw 'Y'
Draw 'Y' in an x-by-x matrix (where x is odd and x >= 3) Examples: x = 3 y = [1 0 1 0 1 0 0 1 0] x = 5 y = [1...

3개월 전

문제를 풀었습니다


unique with nan
input x = [2 NaN 3 5 NaN; 1 NaN 4 9 NaN; 8 -2 7 6 -2; 7 4 8 5 4]; output y_correct = [2 ...

3개월 전

문제를 풀었습니다


Assign matrix rows/columns to separate variables
This is a slight variant of <http://www.mathworks.com/matlabcentral/cody/problems/2668-assign-matrix-elements-to-separate-variab...

3개월 전

문제를 풀었습니다


Weighted Convolution
Given two input vectors x = [x_1, x_2, ..., x_K] and y = [y_1, y_2, ..., y_K] of equal length, compute the weighted convolution ...

3개월 전

문제를 풀었습니다


Multiply to the limit?
If y = 4*x*x/pi/pi then what is the ultimate limiting result of (1+y/1/1)(1+y/3/3)(1+y/5/5)(1+y/7/7)... ... within 1000*eps?

3개월 전

문제를 풀었습니다


minimum numbers of 1 to build n
The (Mahler-Popken) complexity of n: minimal number of 1's required to build n using + and *. see A005245. In this problem, yo...

3개월 전

문제를 풀었습니다


remove numbers from a string
check the given string for any numbers.in case one is found,remove it.but the two portions should be separated. if more than one...

3개월 전

문제를 풀었습니다


Frobenius McNugget Factorization
Mr. Frobenius McNugget is a peculiar man. As you might expect, he likes to eat Chicken McNuggets. But his love of number theo...

3개월 전

문제를 풀었습니다


first step for Huffman Coding (easy)
Given a string, you must sort the characters by occurrence (from lowest to highest). This step is necessary to generate a Huf...

3개월 전

더 보기