Solved


Monte Carlo integration: area of a polygon
The area of a polygon (or any plane shape) can be evaluated by <https://www.mathworks.com/matlabcentral/cody/problems/179 Monte ...

8 years ago

Solved


Transpose the Matrix
Transpose the given matrix, e.g. x=[a b;c d] transpose of x = [a c;b d]

8 years ago

Solved


Divisible by n, prime divisors from 20 to 200
Pursuant to the previous problem (linked below), this problem requires a function that checks for divisibility of large numbers ...

8 years ago

Solved


Placing Beads Neatly in a Box
You are given a string of n black and white beads. Your job is to pack them neatly into a square box. "Neatly" in this case mean...

8 years ago

Solved


The cake is a lie...
You're hosting a birthday party with a large number of screaming children. Fortunately, you have a gigantic sheet cake in front...

8 years ago

Solved


Sorting integers by their digits (Level 4)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42815-sorting-integers-by-their-digits-level...

8 years ago

Solved


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

8 years ago

Solved


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

8 years ago

Solved


Hexagonal Tiling Dots in a Circle
Return how many <http://en.wikipedia.org/wiki/Hexagonal_grid Hexagonal Tiling> grid points there are inside a circle of radius _...

8 years ago

Solved


Shifted Hexagonal Tiling Dots in a Circle
Return how many <http://en.wikipedia.org/wiki/Hexagonal_grid Hexagonal Tiling> grid points there are inside a circle of radius _...

8 years ago

Solved


Pancakes for everyone!
Accordingly to the <http://nl.mathworks.com/matlabcentral/cody/problems/42460-the-cake-is-a-lie problem 42460>. All the children...

8 years ago

Solved


Euclidean distance from a point to a polynomial
A not uncommon problem in the area of computational geometry is to find the closest point to a straight line from a given point,...

8 years ago

Solved


Conic equation
A conic of revolution (around the |z| axis) can be defined by the equation s^2 – 2*R*z + (k+1)*z^2 = 0 where |s^2=x^2+y...

8 years ago

Solved


Triangular Tiling Dots in a Circle
Return how many <http://en.wikipedia.org/wiki/Triangular_tiling Triangular Tiling> grid points there are inside a circle of radi...

8 years ago

Solved


Find the optimal shape to bring the maximum product by a given perimeter
Find the optimal shape (with Nopt sides, where Nopt is at least 3) to bring the maximum product of the sides length, given a spe...

8 years ago

Solved


Points on a circle.
This problem is related to <url=http://www.mathworks.com/matlabcentral/cody/problems/1283-points-on-a-sphere>Problem 1283, Point...

8 years ago

Solved


Dots in a Sphere
Return how many integer grid points there are inside a 3D sphere of radius _r_ centred at (0,0,0) (including points on the edge)...

8 years ago

Solved


Minimum Distance between two N-sided Polygons
This Challenge is to determine the minimum distance between two non-overlapping polygons. The input is a cell array of two vecto...

8 years ago

Solved


Substring Extraction
In a given string, find the substring between Start_string and End_string. You will have to include or exclude the Start_str...

8 years ago

Solved


Expand 10^n to Powers of 4
Given an integer n, return the coefficients c = [c_n,c_n-1,...,c_0] Such that 10^n = c_n*4^(n) + c_n-1*4^(n-1...

8 years ago

Solved


Solve the 2-norm Regularization Problem
In data fitting, regularization is a technique to stabilize an ill-posed problem. <https://en.wikipedia.org/wiki/Tikhonov_regula...

8 years ago

Solved


The Generalized-N Eggs Problem
A firm has invented a super-strong egg. For publicity purposes, it wants to determine the highest floor in a story building with...

8 years ago

Solved


Highly divisible triangular number (inspired by Project Euler 12)
Triangular numbers can be calculated by the sum from 1 to n. For example, the first 10 triangular numbers are: 1, 3, 6, 10, ...

8 years ago

Solved


Large Sum (inspired by Project Euler 13)
Your function will be provided an arbitrary number of numbers of arbitrary sizes as a cell array of strings. Some numbers will b...

8 years ago

Solved


Solve Rubik's Cube - One Rotation
A standard Rubik's Cube is shown in 3-D and also unfolded to identify the specific Tile-face/Vector numbering. The faces are ...

8 years ago

Solved


Perform Rubik's Cube Moves
A standard Rubik's Cube is shown in 3-D and also unfolded to identify the specific Tile-face numbering. The faces are White-U...

8 years ago

Solved


Find the Pattern
Find the pattern between input and output. Write a function that gives the correct output for any input. *Hint: magic*

8 years ago

Solved


Red and green towers
Frankie has a large number of wooden cubes, painted in red and green. He is building little towers with his cubes, by stacking t...

8 years ago

Solved


Sums of cubes and squares of sums
Given the positive integers 1:n, can you: 1. Compute twice the sum of the cubes of those numbers. 2. Subtract the square...

8 years ago

Solved


Pass the Threshold!!
Write a Matlab function that will take as input a matrix of arbitrary dimensions and a scalar threshold value, and return a vec...

8 years ago

Load more