A résolu

Find vampire numbers
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such th...

12 mois il y a

A résolu

Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

12 mois il y a

A résolu

Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

12 mois il y a

A résolu

Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

12 mois il y a

A résolu

Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

12 mois il y a

A résolu

Proper Factors
Generate the proper factors of input integer x and return them in ascending order. For more information on proper factors, refer...

12 mois il y a

A résolu

Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

12 mois il y a

A résolu

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

12 mois il y a

A résolu

Matrix spiral
Make a spiral in a (n*n) matrix. The spiral has to start in the top left, and has to rotate clockwise to the center. The spiral ...

environ un an il y a

A résolu

Spiral In
Create an m by n matrix filled with sequential integers starting from 1 and arranged in a counterclockwise spiral that hugs the ...

environ un an il y a

A résolu

Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

environ un an il y a

A résolu

Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

environ un an il y a

A résolu

Spot the rectangle (Part 2)
This problem is related to the <http://bit-player.org/2009/the-17x17-challenge 17x17 challenge>. See also <http://www.mathworks....

environ un an il y a

A résolu

Spot the rectangle
This problem is related to the <http://bit-player.org/2009/the-17x17-challenge 17x17 challenge>. Given a matrix filled with ones...

environ un an il y a

A résolu

Create a patchwork matrix
This function will assemble a large matrix out of a number of smaller ones m1, m2, etc., according to a pattern P. If P is 3x5,...

environ un an il y a

A résolu

Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

environ un an il y a

A résolu

Create a matrix X, where each column is a shifted copy of the vector v
Example : in->v = (1:5)'; 1 2 3 4 5 out-> [1 5 4 3 2;2 1 5 4 3;3 2 1 5 4;4 3 2 1 5;5 4 3 ...

environ un an il y a

A résolu

Twist 'n' Match
Given n and m, construct an n-by-n matrix a such that a, when rotated 90 degrees and compared with itself, matches itself in exa...

environ un an il y a

A résolu

"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

environ un an il y a

A résolu

Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

environ un an il y a

A résolu

Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

environ un an il y a

A résolu

Make a logical diamond using GALLERY function
Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/1078-make-a-diamond Problem 1078. Make a diamond> In thi...

environ un an il y a

A résolu

Mirror Image matrix across anti-diagonal
Given an input number x, create a mirror image matrix 'Y' across the anti-diagonal. For example, if x=3, Y = [1 2 3; ...

environ un an il y a

A résolu

Create Volcano (or Atoll) martix. It is an extension of Bullseye matrix problem.
For example, if n=2 (maximum value), the output matrix should be [1 1 1 1 1; 1 2 2 2 1; 1 2 1 2 1; 1 2 2 2 1; 1 1 ...

environ un an il y a

A résolu

Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

environ un an il y a

A résolu

N-Dimensional Array Slice
Given an N-dimensional array, _A_, an index, _I_, and a dimension, _d_, return the _I_ th elements of _A_ in the _d_ dimension. ...

environ un an il y a

A résolu

Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

environ un an il y a

A résolu

Operate on matrices of unequal, yet similar, size
You may want to add a vector to a matrix, implying that the vector is added to each column of the matrix. Or multiply a 3x4x5 ma...

environ un an il y a

A résolu

Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

environ un an il y a

A résolu

Rotate input square matrix 90 degrees CCW without rot90
Rotate input matrix (which will be square) 90 degrees counter-clockwise without using rot90,flipud,fliplr, or flipdim (or eval)....

environ un an il y a