Solved


Fifteen Parity Check
The Matlab function fifteen initializes the 4x4 array with randperm(16), which produces 50% unsolvable puzzles. A <https://en.wi...

10 years ago

Solved


generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

10 years ago

Solved


Wien's displacement law
Given the black body temperature (in *Celsius*), output the weavelength (in *meters*) at which the radiation peaks, according to...

10 years ago

Solved


Isothermal Expansion
Given the initial pressure and volume of an ideal gas, calculate the new volume, given the new pressure. Hint: <https://en.wi...

10 years ago

Solved


Does this dress make me look fat
For the input string "Does xyz make me look fat" output the string "No, xyz does not make you look fat"

10 years ago

Solved


Lose control
Remove all characters that are below space in ASCII value.

10 years ago

Solved


Lambert's W
Matlab cody does not support lambertw. Try to create a lambert's w function yourself. Lambert's W is the function that solves...

10 years ago

Solved


RGB to CMYK
Convert an RGB code to the corresponding CMYK code for printing. The RGB input is a [1×3] double array between 0 and 1. ...

10 years ago

Solved


The sliding puzzle: 15
If you are unfamiliar with the sliding puzzle, enter the command _fifteen_ in your MATLAB command window (or search online, of c...

10 years ago

Problem


The sliding puzzle
If you are unfamiliar with the sliding puzzle, enter the command _fifteen_ in your MATLAB command window (or search online, of c...

10 years ago | 6 | 29 solvers

Problem


Return the sequence element III
This problem is related to <http://www.mathworks.com/matlabcentral/cody/problems/42832-segmented-number-sequence Problem 42832>....

10 years ago | 5 | 24 solvers

Problem


Identify the sequence
Given a row vector, x, return 1 if it is an arithmetic series, or 2 if it is a geometric series. If it is neither, return 0. ...

10 years ago | 2 | 31 solvers

Problem


Increasing sub-sequence (Level 2)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42837-increasing-sub-sequence-level-1 Proble...

10 years ago | 2 | 19 solvers

Solved


Increasing sub-sequence (Level 1)
Given a vector, v, of real numbers, return a positive integer, n, representing the longest contiguous increasing sub-sequence co...

10 years ago

Problem


Increasing sub-sequence (Level 1)
Given a vector, v, of real numbers, return a positive integer, n, representing the longest contiguous increasing sub-sequence co...

10 years ago | 3 | 31 solvers

Problem


Juggler sequence revisited
This problem is related to <http://www.mathworks.com/matlabcentral/cody/problems/42835-return-the-sequence-element-ii Problem 42...

10 years ago | 2 | 30 solvers

Solved


Return the sequence element II
Given positive integers x and n, return a positive integer, y, which is the nth term in the <https://en.wikipedia.org/wiki/Juggl...

10 years ago

Problem


Return the sequence element II
Given positive integers x and n, return a positive integer, y, which is the nth term in the <https://en.wikipedia.org/wiki/Juggl...

10 years ago | 1 | 46 solvers

Problem


Return the sequence element
Given a positive integer, x, return a positive integer, y, which is the nth term in the sequence [1 2 2 3 3 3...], in which one ...

10 years ago | 0 | 45 solvers

Problem


Segmented number sequence
Given a positive integer, n, and a row vector, x, of positive integers, return a row vector, v, which is a sequence of length n ...

10 years ago | 3 | 17 solvers

Problem


Integer complexity
Given an array, n, of positive integers, return an array, c, of the same size, in which each element is the <https://en.wikipedi...

10 years ago | 3 | 26 solvers

Solved


Complex transpose
Calculate the transpose of a matrix having complex numbers as its elements without changing the signs of the imaginary part. ...

10 years ago

Solved


Complex number
For complex number c=a+bi, write code that will add a and b together.

10 years ago

Solved


Back to basics 17 - white space
Covering some basic topics I haven't seen elsewhere on Cody. Remove the trailing white spaces from the input variable

10 years ago

Solved


Constructing strings
* Construct a string alphaString from 'a' to endLetter, using the double colon operator. Ex: If endLetter = 'e', then alphaSt...

10 years ago

Solved


Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

10 years ago

Solved


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

10 years ago

Problem


Hilbert numbers
Given a positive integer, n, return h as follows: 1. If n is not a <https://en.wikipedia.org/wiki/Hilbert_number Hilbert numb...

10 years ago | 2 | 61 solvers

Problem


Number construction III
Given a positive integer, n, return a, b and c, such that 1. n = a^1.5+b^2.5+c^3.5 2. a, b and c are all positive integers...

10 years ago | 2 | 36 solvers

Problem


Number construction II
Given a positive integer, n, return a, b, c and d, such that 1. n = a*2^b+c*3^d 2. a, b, c and d are all positive integers...

10 years ago | 2 | 35 solvers

Load more