Solved

Identify Wagstaff primes
The numbers 3, 43, and 2731 are examples of <https://mathworld.wolfram.com/WagstaffPrime.html Wagstaff primes>. Write a func...

8 months ago

Solved

Count the primes in Collatz sequences
Several Cody problems (21, 69, 42937, 44448, 44784, 52422) involve Collatz sequences. These start with a seed . If is odd, the ...

8 months ago

Solved

Easy Sequences 12: 50th Prime
Write a function that outputs the 50th prime after a given number. For example, the 50th prime after 500 is 829. NOTE: If 'n' i...

8 months ago

Solved

Easy Sequences 1: Find the index of an element
The nth element of a series A is defined by: . Obviously, the first element A(1) = 1. Given the nth element 'A(n)', find the val...

9 months ago

Solved

Easy Sequences 2: Trigonometric function with integral input and output
The function 'F', defined as: , will always return an integer if the input is a natural number (in radian...

9 months ago

Solved

Easy Sequences 9: Faithful Pairs
A "faithful number" is a non-prime number that is one less or one more than some prime number but not both. For example, for num...

9 months ago

Solved

Easy Sequences 8: Triangles with integer sides and prime perimeters
The triangle below is special. It has integer sides and a prime perimeter. Given an integer "n" we want to know how many t...

9 months ago

Solved

Easy Sequences 4: Eliminate the Days of Confusion
If a date is written in purely numeric format some dates can be confusing, if we don't know the date format used. For example, "...

9 months ago

Solved

Spherical surface triangulation
Create a triangulation of a spherical surface with approximately-uniform coverage http://www.alfnie.com/software/print_sphere...

9 months ago

Solved

Reduce the logic
We have three logical input, x,y and z. The output is: y = ((x&y)|z)&((z|x&y)|(z&y|x))|((x&z)|z)&((y|x&z)|(z&x|y))|(x|y|z) ...

9 months ago

Solved

How many complete pizzas (number 2)
x is a vector with numbers of pizza slices. A corresponding vector n indicates in how many slices the pizza slices of x were cut...

9 months ago

Solved

make histogram
You probably know the function hist(x,n) to get the histogram. Now try to write the function yourself! For the cheaters wanting...

9 months ago

Solved

Connect 4 (the boardgame)
You are playing the popular game "Connect 4" ( <https://en.wikipedia.org/wiki/Connect_Four>) against Matlab. Luckily, Matlab isn...

9 months ago

Solved

Connect Four: find winning move
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/90-connect-four-win-checker this problem>... <http://en.wik...

9 months ago

Solved

Rumis Scorer 4
This problem is very similar to <https://www.mathworks.com/matlabcentral/cody/problems/3101-rumis-scorer-3 Rumis Scorer 3>. The ...

9 months ago

Solved

Rumis Scorer 2
<http://en.wikipedia.org/wiki/Rumis Rumis> is a multiplayer 3D block board game where the goal is to have the most squares visib...

9 months ago

Solved

Rumis Scorer 3
<http://en.wikipedia.org/wiki/Rumis Rumis> is a multiplayer 3D block board game where the goal is to have the most squares visib...

9 months ago

Solved

Rumis Scorer 1
<http://en.wikipedia.org/wiki/Rumis Rumis> is a multiplayer 3D block board game where the goal is to have the most squares visib...

9 months ago

Solved

Mastermind V: Optimal Solver - average number of guesses
The following description contains a copy of Richard Zapor's <https://www.mathworks.com/matlabcentral/cody/problems/44239-master...

9 months ago

Solved

Mastermind IV: Optimal Solver - max of 5 guesses
<https://en.wikipedia.org/wiki/Mastermind_(board_game) Mastermind> is a code breaking logic puzzle. A pattern of 6 colors(values...

9 months ago

Solved

Mastermind III: Solve in 1
<https://en.wikipedia.org/wiki/Mastermind_(board_game) Mastermind> is a code breaking logic puzzle. A pattern of 6 colors(values...

9 months ago

Solved

Mastermind II: Solve in 8 or less
<https://en.wikipedia.org/wiki/Mastermind_(board_game) Mastermind> is a code breaking logic puzzle. A pattern of 6 colors(values...

9 months ago

Solved

Mastermind I: Solve all 1296 cases
<https://en.wikipedia.org/wiki/Mastermind_(board_game) Mastermind> is a code breaking logic puzzle. A pattern of 6 colors(values...

9 months ago

Solved

Mastermind
We are playing the boardgame mastermind <https://en.wikipedia.org/wiki/Mastermind_(board_game)>. The game master has created a 4...

9 months ago

Solved

Check capital letters
Check if each first letter of a string is a capital letter. for example: 'This Is Ok' gives a true answer and 'This Is not Ok' ...

9 months ago

Solved

Determine the Result of a Move in Reversi
Note: This is closely related to <http://www.mathworks.com/matlabcentral/cody/problems/2538-find-the-next-legal-move-in-reversi ...

9 months ago

Solved

Find the Next Legal Move in Reversi
<http://en.wikipedia.org/wiki/Reversi Reversi>, also known as Othello, is a game in which reversible white/black chips are place...

9 months ago

Solved

Give a matrix that matches itself when rotated
Given n and s, return a n-by-n matrix a of integers such that sum(sum(a == rot90(a))) is equal to exactly s. The integer...

9 months ago

Solved

Spot the rectangle
This problem is related to the <http://bit-player.org/2009/the-17x17-challenge 17x17 challenge>. Given a matrix filled with ones...

9 months ago

Solved

Dealfun (1.0)
*Short description.* Write a function _dealfun_: [y1,y2,...,yn]=dealfun(fhandle,x1,x2,...,xn) which evaluates the f...

10 months ago