문제를 풀었습니다


Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

대략 7년 전

문제를 풀었습니다


Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

대략 7년 전

문제를 풀었습니다


N-Dimensional Array Slice
Given an N-dimensional array, _A_, an index, _I_, and a dimension, _d_, return the _I_ th elements of _A_ in the _d_ dimension. ...

대략 7년 전

문제를 풀었습니다


Operate on matrices of unequal, yet similar, size
You may want to add a vector to a matrix, implying that the vector is added to each column of the matrix. Or multiply a 3x4x5 ma...

대략 7년 전

문제를 풀었습니다


Some Assembly Required
The input to this function is a matrix of real numbers. Your job is to assemble the rows of the matrix into one large row that ...

대략 7년 전

문제를 풀었습니다


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

대략 7년 전

문제를 풀었습니다


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

대략 7년 전

문제를 풀었습니다


Points on a Sphere
Given a sphere of radius R, determine how many points on the surface of that sphere have three integer coordinates. Do not outp...

대략 7년 전

문제를 풀었습니다


Dots in a Diamond
Return how many <http://en.wikipedia.org/wiki/Diamond_cubic Diamond Cubic> lattice grid points there are inside a 3D sphere of r...

대략 7년 전

문제를 풀었습니다


Determine if a Given Number is a Triangle Number
*Description:* Determine if the elements of an input array are triangle numbers and return the result as an array with the sa...

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


Compute Fibonacci Number
Compute the _n_-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

대략 7년 전

문제를 풀었습니다


Kaprekar numbers
Test if the input is a Kaprekar number: <http://mathworld.wolfram.com/KaprekarNumber.html>. Return a logical true or false. ...

대략 7년 전

문제를 풀었습니다


Narcissistic number ?
Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

대략 7년 전

문제를 풀었습니다


Find the 9's Complement
Find the 9's complement of the given number. An example of how this works is <http://electrical4u.com/9s-complement-and-10s-c...

대략 7년 전

문제를 풀었습니다


Armstrong Number
Determine whether the given input n-digit number is Armstrong Number or not. Return True if it is an Armstrong Number. An n-D...

대략 7년 전

문제를 풀었습니다


Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


Is this number Munchhausen Narcissistic?
In this problem, simply return 1 if a supplied number is Munchhausen narcissistic or 0 if not. Example 153 is narcissistic...

대략 7년 전

문제를 풀었습니다


Polite numbers. N-th polite number.
A polite number is an integer that sums of at least two consecutive positive integers. For example _7 = 3+4_ so 7 is a polite...

대략 7년 전

문제를 풀었습니다


Bell Number calculator
Calculate a vector of Bell numbers for sets up to length n. Bell numbers are the maximum number of partitions of a set. See the ...

대략 7년 전

문제를 풀었습니다


N-th Odious
Given index n return n-th <https://oeis.org/A000069 odious number>.

대략 7년 전

문제를 풀었습니다


Polite numbers. Politeness.
A polite number is an integer that sums of two or more consecutive positive integers. Politeness of a positive integer is a num...

대략 7년 전

문제를 풀었습니다


Polygonal numbers
The task of <http://www.mathworks.co.uk/matlabcentral/cody/problems/5 Problem 5> is to calculate triangular numbers. By playing ...

대략 7년 전

문제를 풀었습니다


nth Rational Number
Return the nth rational number. This is the inverse to Problem <http://www.mathworks.com/matlabcentral/cody/problems/1471 1...

대략 7년 전

문제를 풀었습니다


Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

대략 7년 전

문제를 풀었습니다


Generate a Parasitic Number
This problem is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/156-parasitic-numbers Problem 156>. ...

대략 7년 전

문제를 풀었습니다


Find perfect placement of non-rotating dominoes (easier)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

대략 7년 전

문제를 풀었습니다


Number of Horns on a unicorn!
Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

대략 7년 전

문제를 풀었습니다


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

대략 7년 전

더 보기