Solved


List the dihedral primes

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

3 years ago

Solved


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

3 years ago

Solved


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

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

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

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

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

3 years ago

Solved


Beat the RNG - EASY

3 years ago

Solved


X O X Oh!
_This follows on from problem 44850 - X O X O_ <https://www.mathworks.com/matlabcentral/cody/problems/44850-x-o-x-o> On a...

3 years ago

Solved


Word Distance - Average Sort
Based on the method of <https://www.mathworks.com/matlabcentral/cody/problems/44815-word-distance-sum this problem>, write a fun...

3 years ago

Solved


Design a well field in an infinite aquifer
A well field provides water for a community. The design of a well field involves a goal to meet a specified service demand (i.e...

3 years ago

Solved


Sorting integers by their digits (Level 1)
Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...

3 years ago

Solved


I want to know everything!
I am always a little bit paranoid. Now, I want to know what my co-workers do with my MATLAB when I am not here. Find (i...

3 years ago

Solved


Clear all empty variables from the workspace
I want to clear all empty variables from my workspace. See tests suite.

3 years ago

Solved


What is the scope of variables in Matlab ?
How to do this little hack ? a=10; b=5; y=change_var(a,1); assert(isequal(a,1))

3 years ago

Solved


Writing Error Messages
Well written functions check inputs to make sure the input is valid. The function ErrorCheck takes three arguments: * a - a s...

3 years ago

Solved


Connect Four - 02
Previous Problem <https://www.mathworks.com/matlabcentral/cody/problems/45354-connect-four-01> In addition to previous proble...

3 years ago

Solved


Connect Four - 01
Connect four is a two player board game. <https://en.wikipedia.org/wiki/Connect_Four> Given a complete connect-four board,...

3 years ago

Solved


Number generator
In this problem, a number will be given. starting with the first digit, keep on adding all subsequent digits till the state (...

3 years ago

Solved


Ramanujan's Number
About 1729 1729 is the first positive integer which can be expressed as the sum of two positive cubes in two different ways. ...

3 years ago

Solved


Calculate BMI
Given weight in kgs and height in metres, calculate body mass index

3 years ago

Solved


Test Driven Solution - Probability Problem 2
*Problem:* Without any Cody cheats, write code that passes the test suite. *Hint:* The test suite gets samples from the proba...

3 years ago

Solved


Graph Algorithms - 2 : Chromatic Number
Chromatic number of a graph is the minimum number of distinct colors required to color all the vertices of the graph such that n...

3 years ago

Solved


Count the Number of Undirected Cycles in a Graph
Given a symmetric adjacency matrix, determine the number of unique undirected cycles. For example, the graph represented by adj...

3 years ago

Solved


Compression: Encode and Decode
This Challenge is to compress an array created by randi(2^32-1,1000) and then decompress your data file. The first call will ...

3 years ago

Solved


Should Mr McNugget even get out of bed today?
As we learned in <http://www.mathworks.com/matlabcentral/cody/problems/42888-frobenius-mcnugget-factorization an earlier problem...

3 years ago

Solved


Frobenius McNugget Factorization
Mr. Frobenius McNugget is a peculiar man. As you might expect, he likes to eat Chicken McNuggets. But his love of number the...

3 years ago

Solved


Loading/Expanding a ZIP file from File Exchange
This challenge is to load a ZIP file from Mathworks File Exchange and UNZIP the contents. *Input:* url_link of ZIP'd file ...

3 years ago

Load more