Solved


Remove TeX from string
Matlab’s TeX support in figure windows is great for displaying information in a visually appealing way. However, many of the TeX...

1 month ago

Solved


Binpack Contest: Retro
The <http://www.mathworks.com/matlabcentral/contest/contests/3/rules Full Binpack Rules and examples>. This Challenge is a re...

1 month ago

Solved


Mirror, mirror on the wall, who is fairest of them all?
The Elo rating system was featured in the movie *The Social Network* during the <https://www.youtube.com/watch?v=BzZRr4KV59I/ al...

1 month ago

Solved


Get to a number faster.
If you start with $1 and, with each move, you can either double your money or add another $1, what is the smallest number of mov...

1 month ago

Solved


Determine the average number of rounds for the following game.
Each round a uniformly distributed random number is picked between 0 and 1. The game ends when the sum of the random numbers is ...

1 month ago

Solved


A Simple Shielding Problem

1 month ago

Solved


Rotate matrix by coloumns

1 month ago

Solved


Is this function available?
Sometimes it is difficult to remember which functions are not allowed on the Cody platform. Given a function as a string, return...

1 month ago

Solved


Backgammon #4 - Dice Probabilities
Previous problems in this series have looked at how a backgammon board might be represented, and board positions manipulated and...

1 month ago

Solved


007: Chinese Barrack Invasion
*MISSION:* Successfully invade a military barrack located in China. *WARNING:* There is a row of _n_ security switches protec...

1 month ago

Solved


Parcel Routing
Given a matrix that represent the distance along highways between major cities numbered 1 to _N_, provide the path and shortest ...

1 month ago

Solved


Implement str2cell
You are given a String that is equivalent to a cell array of scalars or vectors. Transform this String to its equivalent Cell ar...

1 month ago

Solved


Count estrangements
Recently I made a puzzle for my wife that included a cryptogram, which involves an arrangement of the letters A through Z. I use...

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

2 months ago

Solved


Game of life - 02
refer to <https://en.wikipedia.org/wiki/Conway's_Game_of_Life> refer to <https://www.mathworks.com/matlabcentral/cody/probl...

2 months ago

Solved


Game of life - 01
Refer to <https://en.wikipedia.org/wiki/Conway's_Game_of_Life> given a set of cells (the initial state) represented by 1(l...

2 months ago

Solved


Create nXn Fourier matrix

2 months ago

Solved


Seconds
Given the number of seconds after 12 am, find the time in the given format (12/24). If the format is not mentioned, use 24-ho...

2 months ago

Solved


Invert a 3D rigid-body transformation
Given an SE(3) matrix representing a rigid-body motion, compute its inverse without using |inv()| or |pinv()| .

2 months ago

Solved


Determine the minimum number of swaps to sort a vector
Cody Problem 1401 asks us to sort a vector with the bubble sort algorithm and count the number of swaps needed. For example, to ...

2 months ago

Solved


List the dihedral primes

2 months ago

Solved


Maya - 03
Following up on the previous two problems, now you've to add or subtract two Maya numerals. The 3rd input will be a function ...

2 months ago

Solved


Maya - 02
<https://en.wikipedia.org/wiki/Maya_numerals> Prev. prob. - <https://www.mathworks.com/matlabcentral/cody/problems/45375-maya...

2 months ago

Solved


Maya - 01
Given a number, convert it into the Maya numeral system. <https://en.wikipedia.org/wiki/Maya_numerals> For example, n...

2 months ago

Solved


List numbers such that every sum of consecutive positive integers ending in those numbers is composite
The sequence in question in this problem involves numbers such that all sums of consecutive positive integers ending with are ...

2 months ago

Solved


Determine whether a number is a prime self number
Integers can be classified as generated numbers or self numbers. A generated number is one that can be expressed as the sum of a...

2 months ago

Solved


Breaking Bad Tiles (Spelling with Element Symbols)
Given a word, how you would spell it with element symbols from the periodic table? For instance, if given the string "Paper", yo...

2 months ago

Solved


Check if a directory is on the current MATLAB search path
Given a directory name as a string, return true if the directory is on the current MATLAB search path, and false otherwise.

2 months ago

Load more