已解决


Calculate the Hamming distance between two strings
Inspired by a similar Cody problem found <http://www.mathworks.com/matlabcentral/cody/problems/93-calculate-the-levenshtein-dist...

14 years 前

已解决


Remove the two elements next to NaN value
The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

14 years 前

已解决


SET (the card game)
<http://www.setgame.com/set/index.html SET> is a card game in which players try to find valid 3-card sets from 12 cards on the t...

14 years 前

已解决


Compute the dilation of a binary image
A basic operation in image analysis is the dilation. Given an image where each pixel is either on or off (black/white, true/fals...

14 years 前

已解决


Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
Find the remaining side of a triangle given the hypotenuse and a side. However, the normal functions and symbols are not allowe...

14 years 前

已解决


Solve Quadratic : No * - or key functions permitted
Solve the quadratic equation *ax^2+bx+c=0*. However, some of the normal functions and symbols are not allowed. x=[ -b +/- sq...

14 years 前

已解决


Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

14 years 前

已解决


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

14 years 前

已解决


give nth decimal place of pi
max 15th place after the decimal point is ok for now

14 years 前

已解决


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

14 years 前

已解决


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

14 years 前

已解决


Find the largest value in the 3D matrix
Given a 3D matrix, A, find the largest value. E.g. >> A = 1:9; >> A=reshape(A,[3 1 3]); >> islargest(A) ans = 9

14 years 前

已解决


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

14 years 前

已解决


Give the Shortest Path Through The Maze
*Description* The purpose of this problem is to give the shortest path through a maze. The maze will be provided in a codifie...

14 years 前

已解决


Minefield Sonar
*Background* In mine-hunting games (e.g. Microsoft Minesweeper), the user is provided with a covered grid that, upon a left c...

14 years 前

已解决


Accumulate Cells
Given a combining function, a cell array, and an initial value, accumulate the result. For example, accumcell(@plus,{1,...

14 years 前

已解决


Find similar/related functions
The _help_ function can be useful for getting quick assistance on a particular function. For most built-in MATLAB functions, a p...

14 years 前

已解决


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

14 years 前

已解决


Pentago: find winning move
<http://en.wikipedia.org/wiki/Pentago Pentago> is a challenging two-player strategy game. The objective is to be the first playe...

14 years 前

已解决


Criss_Cross_010 : Unique elements, Square array, Words in one array
Criss Cross matrix puzzle - Square matrix, Unique elements, Single Word List Arrange the "words" into a solid square such tha...

14 years 前

已解决


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

14 years 前

已解决


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

14 years 前

已解决


So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

14 years 前

已解决


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

14 years 前

已解决


Change a specific color in an image
The ability to change colors can be a useful tool in image processing. Given an m x n x 3 array (much like CData in images), fin...

14 years 前

已解决


Criss_Cross_000 : Unique elements in a Square array
Criss Cross matrix puzzle - Easy: Square matrix, Unique elements Arrange the "words" into a solid square such that all words ...

14 years 前

已解决


Hamming Weight - Fast
The Hamming Weight, <http://en.wikipedia.org/wiki/Hamming_weight wiki Hamming Weight>, in its most simple form is the number of ...

14 years 前

已解决


Hamming Weight - Size Scoring
The Hamming Weight, <http://en.wikipedia.org/wiki/Hamming_weight wiki Hamming Weight>, in its most simple form is the number of ...

14 years 前

已解决


Mandelbrot Number Test [Real+Imaginary]
The <http://en.wikipedia.org/wiki/Mandelbrot_set Mandelbrot Set> is built around a simple iterative equation. z(1) = c z...

14 years 前

已解决


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

14 years 前

加载更多