Solved


Number of paths on a grid
Consider a grid formed by n vertices vertically down, and m vertices horizontally right. Your starting point is at the top lef...

3 months ago

Solved


Fractal: area and perimeter of Koch snowflake
Starting from an equilateral triangle with side 's', what is the area and perimeter of Koch snowflake at n'th recursive iteratio...

3 months ago

Solved


Given a number between 1-365 (a day number in a non leap year) , find what day of what month it is.
For a given number between 1-365 (a day number in a non leap year), you should check which day of which month it is. for exampl...

3 months ago

Solved


Hamiltonian Cycle
This is related to the Travelling Salesman Problem 1339 created by Alex P. A Hamiltonian cycle or traceable cycle is a path tha...

3 months ago

Solved


Disjunctive Normal Form
This problem is the companion to Problem <http://www.mathworks.com/matlabcentral/cody/problems/1484 1484>. In Boolean logic, a f...

3 months ago

Solved


Ring Matrix
Given n (only odd), return output matrix a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. ...

3 months ago

Solved


Pizza order
A pizza order by phone in diameter d1, pizza will be make only in diameter d2. Return the pizza pieces p should be make.(pizza ...

3 months ago

Solved


convert 2D array of ones and zeros to checkerboard array of [1,2] where the original array was ones and zero elsewhere
Given a 2D array of ones and zeros, generate an equivalent sized checkerboard array of ones and twos. The checkerboard pattern s...

3 months ago

Solved


Radius of an inner N-dimensional sphere
A hypercube is an N-dimensional analogue of a square (N=2). Similarly, an N-sphere is an N-dimensional analogue of a circle. Not...

3 months ago

Solved


A different counting method
Given an array (x) of integers, the "counting" array (y) is showing the number of identical consecutive integers in x in front o...

3 months ago

Solved


Find Sign(Zero Crossing) Changes in Array
Example; A = [1 2 3 -3 -4 -1 -24 2 4 -1 -2 3 1]; ans; [1 2 0 -3 -4 -1 0 2 0 -1 ...

3 months ago

Discussion


Nedsburg Game Hint
I set my 3D matrix up with the players in the 3rd dimension. I set up the matrix with: 1) player does not hold the card (-1), pl...

3 months ago | 0

Discussion


Using Nested Functions and Recursion to Bypass Loop and Conditional Restrictions within Cody Problems
Some MATLAB Cody problems prohibit loops (for, while) or conditionals (if, switch, while), forcing creative solutions. One eleg...

3 months ago | 0

Discussion


Using the On-Line Encyclopedia of Integer Sequences (OEIS) to recognize and solve tricky sequence-based problems
Many MATLAB Cody problems involve recognizing integer sequences. If a sequence looks familiar but you can’t quite place it, the...

3 months ago | 0

Discussion


Solving MATLAB problems involving very large integers
When solving MATLAB Cody problems involving very large integers (e.g., factorials, Fibonacci numbers, or modular arithmetic), yo...

3 months ago | 0

Solved


Clueless - Lord Ned in the Game Room with the Technical Computing Language
[Warning: this is a nontrivial programming problem] Worried about the decline in reasoning skills in the clueless populace of...

3 months ago

Solved


Square area to triangle area
Given the area, A, of a square with side length, c, if a right angle triangle has the same area A and the hypothenuse length 2c ...

3 months ago

Solved


Popular Word Game™ Distance
Professor Ned, who holds the Nedowed Chair of Crackpot Mathematics at the University of Nedsburg, has recently discovered the da...

3 months ago

Solved


The Bridges of Nedsburg
The fabled city of Nedsburg consists of several islands connected by bridges. Due to tectonic forces, shoddy civil engineering, ...

3 months ago

Solved


A Nedlish Country Garden - Check for Valid Arrangement
Nedland is famous for its stately gardens, which typically have a centerpiece of a square grid, with certain squares featuring a...

3 months ago

Solved


Average Number of Moves for the Royal Game of Err
Bored of tedious court assemblies, King Neduchadneddar the Procrastinator has found a cunning way to keep his advisors, councilo...

3 months ago

Solved


Transition Matrix for the Royal Game of Err
Bored of tedious court assemblies, King Neduchadneddar the Procrastinator has found a cunning way to keep his advisors, councilo...

3 months ago

Solved


Convert Decimal to Hexavigesimal
NASA (Ned’s Alien-Spying Agency) have made contact with a 13-fingered race from the planet Genai. Naturally, Ned’s shadowy opera...

3 months ago

Solved


Convert Hexavigesimal to Decimal
NASA (Ned’s Alien-Spying Agency) have made contact with a 13-fingered race from the planet Genai. Naturally, Ned’s shadowy opera...

3 months ago

Solved


Leaderboard for the Nedball World Cup
At the upcoming inaugural Nedball World Cup, organizers need to track who is in the lead for the coveted Golden Toeplitz trophy,...

3 months ago

Solved


Government of the Neds, by the Neds, for the Neds - Distribute the Nedsburg City Councilors
The city of Nedsburg consists of several islands, the number of which changes regularly, due to tectonic forces, shoddy civil en...

3 months ago

Solved


Outlier number!
Find a number which has maximum distance from the mean value of vector A. Example: A=[5 2 1 5 6 2 5 9] y=9

3 months ago

Solved


Create the flag of Ramumbia
The little known nation of Ramumbia has a very simple flag. It is made up of vertical stripes, Red, Green, Blue, that are equall...

3 months ago

Solved


Center of Mass(es) in 3D Space
Given a matrix of format [x1,y1,z1,m1; x2,y2,z2,m2 . . .], return the center of mass of all listed points in 3d space [xc,yc,zc]...

3 months ago

Load more