Solved


Integrate a product of gamma functions
Write a function to compute the following integral: where and is the gamma function, the subject of Cody Problem 46025.

3 years ago

Solved


Circular Segment Area
Let us consider a circle with radius . If we draw an angle (in radians) from the center of the circle, the two radii forming th...

3 years ago

Solved


Unique: Enhanced Performance - Avoiding Memory Crash
The Challenge is to create the unique array for a long and wide array. Difficulties are that the normal unique(a,'rows') func...

3 years ago

Solved


Hamming Weight - Size Scoring
The Hamming Weight, <http://en.wikipedia.org/wiki/Hamming_weight wiki Hamming Weight>, in its most simple form is the number of ...

3 years ago

Solved


Compute a nested cube root
Consider the quantity . Write a function to compute without using loops or recursion.

3 years ago

Solved


Binary Array to Hex Representation
Given a binary array of bytes (lsb to msb), convert it into a hexadecimal representation (msb to lsb). For example: Input: [1 ...

3 years ago

Solved


Can the knight take out the pawn?
* position of knight = k * position of pawns = p can the knight take out those pawns? * k='Nf4' * p={'g6','g7'} then...

3 years ago

Solved


Minimum number of crossings in a complete graph
This problem is related to problem 58384. A complete graph may be drawn in different ways, such that the number of line crossin...

3 years ago

Solved


Minimum number of crossings in a complete bipartite graph
This problem is related to problem 58389. A complete bipartite graph may be drawn in different ways, such that the number of li...

3 years ago

Solved


Determine whether a number is prome
In discussing the unique factorization of numbers in Elementary Number Theory, Underwood Dudley devised a new number system: “C...

3 years ago

Solved


Product of two multivariate polynomials
MATLAB <https://www.mathworks.com/help/matlab/polynomials.html has a few functions> for creating and manipulating single-variabl...

3 years ago

Solved


Classify water surface profiles
Problem statement Write a function to classify the water surface profile starting at depth in a channel with longitudinal slop...

3 years ago

Solved


Draw '5' in Chinese.
Draw a x-by-x matrix '五' using 1s and 0s. Example: x=5 ans= [1 1 1 1 1 0 1 0 0 0 1 1 1 1 0 0 1 0 1 0 1 1 1 1 1] x=7...

3 years ago

Solved


List numbers that cannot be expressed as the sum of fewer than four squares
Lagrange proved that all positive integers can be expressed as the sum of four squares. For example, 27 = 16 + 9 + 1 + 1. Howeve...

3 years ago

Solved


Find the circle inscribed in a triangle
Write a function that takes the x- and y-coordinates of three points describing the vertices of a triangle and returns the cente...

3 years ago

Problem


Create an empty array
Suppose you need an empty array. e = [] will give you one, but it's a double array, which may not help if you need a differen...

3 years ago | 1 | 9 solvers

Solved


GJam 2014 China Rd A: Read Phone Number (Large)
This Challenge is derived from <http://code.google.com/codejam/contest/2924486/dashboard GJam 2014 China Read Phone Number>. Lar...

3 years ago

Solved


Remove runs of at least n consecutive NaNs
This problem is inspired by Dyuman Joshi's problem 58329. Given a row vector x and a natural number n, remove all runs of at lea...

3 years ago

Solved


Split up vector or matrix delimited by NaNs
Given several vectors contained within one vector delimited by NaNs, return each individual vector as an element of a cell vecto...

3 years ago

Solved


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 years ago

Solved


Suma de Gauss
¿Cuál es la suma de los primeros enteros positivos?

3 years ago

Problem


Remove runs of at least n consecutive NaNs
This problem is inspired by Dyuman Joshi's problem 58329. Given a row vector x and a natural number n, remove all runs of at lea...

3 years ago | 0 | 7 solvers

Solved


Continuous NaNs - I
Remove any continuous NaNs that appear in the array - %Example 1 input = [1 NaN 2 NaN NaN 3 NaN NaN NaN] output = [1 NaN 2 ...

3 years ago

Solved


Compute the critical depth of a channel
Problem statement Write a function to compute the critical depth of a channel with discharge . The unit system will be specifie...

3 years ago

Solved


List the semiprimes
A semiprime number—or a 2-almost prime—is the product of two prime numbers. The numbers and are semiprimes, but and are not....

3 years ago

Solved


Determine whether one vector is a subset of another
While bumbling through a pair of problems in the Number Theory group, I wrote code to determine whether a vector is a subset of ...

3 years ago

Solved


Factor a number into Fermi-Dirac primes
Cody Problem 58018 asked you to list the Fermi-Dirac primes, which are prime powers with exponents that are powers of 2. As note...

3 years ago

Load more