已解决


Add
add

4 years 前

已解决


Multiple by 4
multple ny 4

4 years 前

已解决


Create matrix with Gray code
Output "g" should be a matrix of class double, with <http://en.wikipedia.org/wiki/Gray_code Gray reflected binary code>. Inpu...

4 years 前

已解决


Disjunctive Normal Form
This problem is the companion to Problem <http://www.mathworks.com/matlabcentral/cody/problems/1484 1484>. In Boolean logic, a f...

4 years 前

已解决


Conjunctive Normal Form
In Boolean logic, a formula is in conjunctive normal form (CNF) or clausal normal form if it is a conjunction of clauses, where ...

4 years 前

已解决


Number of paths on a grid
Consider a grid formed by n vertices vertically down, and m vertices horizontally right. Your starting point is at the top lef...

4 years 前

已解决


Index of a Rational number
The set of real numbers are infinite. They are so many that real numbers can't even be enumerated. However, unlike real numbers ...

4 years 前

已解决


Numbered lottery balls into cells
You are running a lottery, and have a number of different balls numbered 1 to N. Your job is to figure out how many different w...

4 years 前

已解决


Create an 8-color version of an image
This problem was inspired by a tweet I saw from @MATLAB regarding <http://www.mathworks.com/matlabcentral/fileexchange/37816-the...

4 years 前

已解决


Leap years on other planets
A year is a leap year if it is divisible by 4, but not if it is divisible by 100, unless it is also divisible by 400. This mean...

4 years 前

已解决


Creation of 2D Sinc Surface
This Challenge is to efficiently create the Sombrero function of various sizes, resolutions, and frequencies. <<https://sites...

4 years 前

已解决


Find smallest integer type to accommodate your number
MATLAB supports 1-, 2-, 4-, and 8-byte storage for integer data. Find the smallest integer type to accomodate a scalar integer. ...

4 years 前

已解决


first step for Huffman Coding (easy)
Given a string, you must sort the characters by occurrence (from lowest to highest). This step is necessary to generate a Huf...

4 years 前

已解决


Flip the diagonal values
Write a program that flip the elements of main diagonal , upper and lower diagonal values of a sqare matrix. For example if a ...

4 years 前

已解决


find the second element of array
easy find the second element

4 years 前

已解决


Probability of Choosing a Red Ball
Given two jars of red and blue balls, find the probability of choosing a red ball from Jar 1 after going through the steps. ...

4 years 前

已解决


Coin change combinations.
Using only pennies (1), nickels (5), dimes (10), quarters (25), half dollars (50), and dollars (100), how many different combina...

4 years 前

已解决


Two-output anonymous function?
Return a function handle that when applied to an input, it produces two outputs: the first is the same as the input, and the sec...

4 years 前

已解决


Coin Tossing: Probability of Same Heads for N tosses
A pair of physicists toss a coin n times each. What is the probability that they tossed the same number of heads? *Input:*...

4 years 前

已解决


Find the shortest distance between a point and a straight line.
Given the Cartesian coordinates of three points A, B and C (in a flat Euclidean space), find the shortest distance between the ...

4 years 前

已解决


Distance of the centroids of the balls
Given *n* balls of radius *r* and the vector *p (nx3)* with all position *(x,y,z)* of the balls, return the symmetric matrix *A ...

4 years 前

已解决


Lagrange Interpolation
Given a set of measurements of dependent variables in a vector, Y, that vary with one independent variable in a vector, X, calcu...

4 years 前

已解决


Find files with extension ext in the current directory
List all files with extension 'ext' in the current directory. Return a char matrix with the name of files in rows. Return 0 if...

4 years 前

已解决


Unique: Faster for options 'rows' and 'stable' for large array of uint8
Challenge: Execute unique(a,'rows','stable') Faster for 'a' being uint8. The "unique" function for the 'rows' and 'stable' o...

4 years 前

已解决


Create incremental spiral WITHOUT USING EVAL or FEVAL
Constructions that use feval or eval are used to cheat with cody. This test-suite tries to avoid that trick. The goal of this c...

4 years 前

已解决


1D DCT-II transform.
Implement a function that calculates 1D Discrete Cosine Transform <http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-II...

4 years 前

已解决


Unique: Speed Enhancement for uint(8,16,32)
This Speed Performance Challenge is to optimize Unique for processing uint8/uint16/uint32 variables. *Input:* A (column vecto...

4 years 前

已解决


Functional inputs
Return an n-dimensional array whose elements are the results of a function over a set of vectors. The (i,j,k, ...n)th element...

4 years 前

已解决


Unique: Faster 'rows' for large array of uint8
Challenge: Execute unique(a,'rows') Faster for 'a' being uint8. The "unique" function for the 'rows' options may be performe...

4 years 前

已解决


Find the list of all open files
In the test suite, I use <http://www.mathworks.com/help/matlab/ref/fopen.html fopen> to create new files. The task is to find th...

4 years 前

加载更多