Solved


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

10 years ago

Solved


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

10 years ago

Solved


Histogram of histogram
Histogram of histogram (HoH) is a useful measure concerning the distribution of random data, which has diverse applications in d...

10 years ago

Solved


Can you reshape the matrix?
Given a matrix A, is it possible to reshape it into another matrix with the given number of rows?

10 years ago

Solved


Longest Collatz Sequence
Inspired by Projet Euler n°14. The Collatz iterative sequence (See Cody problem n° 2103 and 211) is defined for the set of po...

10 years ago

Solved


Get all corner elements from a matrix where dimension of matrix is always equal to or greater than 2.
if a given matrix a = [1 2 3;4 5 6]; so answer is going to be [1 3;4 6]

10 years ago

Solved


sort matrix
Given a matrix, sort it for each column, but cannot change the element of each row. for example input = [1 3; 2 4;1 5;3 6]; ...

10 years ago

Solved


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

10 years ago

Solved


Sum my indices
Given inputs M and N (in that order), output an MxN matrix whose entries are equal to the sum of their indices. Example input...

10 years ago

Solved


Find the Final State of an Abelian Sandpile
Let us define an <http://nautil.us/issue/23/dominoes/the-amazing-autotuning-sandpile Abelian sand pile> as a matrix that is only...

10 years ago

Solved


Your favourite city!
Type your favourite city.

10 years ago

Solved


Big Integer Multiplication
Implement big integer multiply. Input: A, B : N-by-M Matrix, each row represents a positive decimal integer. Output: ...

10 years ago

Solved


Maximum of each diagonal
The well-known <http://www.mathworks.com/help/matlab/ref/max.html max> function can operate along either the rows or the columns...

10 years ago

Solved


Make visible max values
Make visible maximum values of rows input = [1 2 3 4 5; 6 9 8 2 1; 2 1 4 5 8; 1 9 7 9 2]; ...

10 years ago

Solved


Create cell array of numeric arrays
Convert the input to a cell array, but only if necessary. If the input is a numeric array, return a 1-by-1 cell array contain...

10 years ago

Solved


Convert ColorSpec string to RGB triplet
Given a ColorSpec string, either in short or long form, return the corresponding RGB triplet. If the input is not a valid color,...

10 years ago

Solved


Convert RGB triplet to ColorSpec string
This is the inverse to <http://www.mathworks.com/matlabcentral/cody/problems/42612-convert-colorspec-string-to-rgb-triplet this ...

10 years ago

Solved


Create a figure and plot data
Given two data vectors (x,y), open a new figure and plot the data. Return the figure handle.

10 years ago

Solved


Factorizing a number into a given number of factors
Given a positive integer, n, and another positive integer, b, return a matrix, M, of width b, with the following properties: (a)...

10 years ago

Solved


Create cell array of strings
Convert the input to a cell array, but only if necessary. If the input is a string, return a 1-by-1 cell array containing the...

10 years ago

Solved


Find Missing Number
A little problem (inspired by CodeChef) for the coffee break. A friend give you an array of size n-1 integers and these int...

10 years ago

Solved


Find smallest number to leave a remainder of 1
given a vector of numbers, find the smallest number to be divisible by all of them with a remainder of 1. Note: input numbers wi...

10 years ago

Solved


Conic equation
A conic of revolution (around the |z| axis) can be defined by the equation s^2 – 2*R*z + (k+1)*z^2 = 0 where |s^2=x^2+y...

10 years ago

Problem


Conic equation
A conic of revolution (around the |z| axis) can be defined by the equation s^2 – 2*R*z + (k+1)*z^2 = 0 where |s^2=x^2+y...

10 years ago | 1 | 23 solvers

Solved


Return area of square
Side of square=input=a Area=output=b

10 years ago

Solved


The Hills Are Alive...
After a long day of coding, you decide to get some fresh air and hike up a nearby hill. The hill isn't very tall, but since you...

10 years ago

Solved


Who am I ?
Who am I ? Write any function that reveals itself under these constraints. Hint: I am combinatorial code, and I don't like stat...

10 years ago

Solved


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

10 years ago

Solved


Generating random matrix with given probability mass function
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/2356-simulating-the-selection-of-a-state-with-given-probabilit...

10 years ago

Solved


Is it column vector?
Is it column vector? Check vector for column vector without using iscolumn function.

10 years ago

Load more