已解决


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

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


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]

11 years 前

已解决


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]; ...

11 years 前

已解决


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,...

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


Your favourite city!
Type your favourite city.

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


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]; ...

11 years 前

已解决


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

11 years 前

已解决


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,...

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


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)...

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

问题


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

11 years 前 | 1 | 26 个解题者

已解决


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

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

加载更多