Risolto

Convert matrix to 3D array of triangular matrices

Given a 2D numeric array x in which each column represents the vectorized form of an upper triangular matrix, return a 3D array ...

circa 5 anni fa

Risolto

Hankelize a matrix

Similar to <http://www.mathworks.com/matlabcentral/cody/problems/42501-toeplitize-a-matrix Problem 42501. Toeplitize a matrix>, ...

circa 5 anni fa

Risolto

Toeplitize a matrix

Similar to <http://www.mathworks.com/matlabcentral/cody/problems/3094-hankelize-a-matrix Problem 3094. Hankelize a matrix>, now ...

circa 5 anni fa

Risolto

matrix zigzag

Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...

circa 5 anni fa

Risolto

Matrix of Multiplication Facts

This is James's daughter again, sneaking into his Cody account. Thanks to your help in my math class last year, I did great! B...

circa 5 anni fa

Risolto

Some Assembly Required

The input to this function is a matrix of real numbers. Your job is to assemble the rows of the matrix into one large row that ...

circa 5 anni fa

Risolto

Polite numbers. Politeness.

A polite number is an integer that sums of two or more consecutive positive integers. Politeness of a positive integer is a num...

circa 5 anni fa

Risolto

Generate a Parasitic Number

This problem is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/156-parasitic-numbers Problem 156>. ...

circa 5 anni fa

Risolto

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

circa 5 anni fa

Risolto

Give me Hamming on five, hold the mayo

A Hamming Number is a positive number that has no prime factor greater than 5. Given a number X, determine how many Hamming num...

circa 5 anni fa

Risolto

nth Rational Number

Return the nth rational number. This is the inverse to Problem <http://www.mathworks.com/matlabcentral/cody/problems/1471 1...

circa 5 anni fa

Risolto

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

circa 5 anni fa

Risolto

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

circa 5 anni fa

Risolto

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

circa 5 anni fa

Risolto

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

circa 5 anni fa

Risolto

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

circa 5 anni fa

Risolto

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

circa 5 anni fa

Risolto

Spiral In

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

circa 5 anni fa

Risolto

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

circa 5 anni fa

Risolto

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

circa 5 anni fa

Risolto

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

circa 5 anni fa

Risolto

Pascal's Matrix

Given an integer n ≥ 0, generate the ( _n_+1) × ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

circa 5 anni fa

Risolto

Pascal's pyramid

In Pascal's triangle each number is the sum of the two nearest numbers in the line above: 1 1 1 ...

circa 5 anni fa

Risolto

Triangular matrices in 3D array

Given a 3D numeric array _x_, return an array _y_ of the same size in which all entries to the right of the main diagonal are ze...

circa 5 anni fa

Risolto

Toeplitz Matrix

For a given square matrix of order n-by-n check whether this is a Toeplitz matrix or not. Return true if it is.

circa 5 anni fa

Risolto

ZigZag matrix with reflected format

ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...

circa 5 anni fa

Risolto

Create a block diagonal matrix

A block diagonal matrix is a square matrix that can be written as A = [a 0 0 0 0 b 0 0 0 0 c 0 ...

circa 5 anni fa

Risolto

BULLSEYE Part 2: Reference Problem 18 BULLSEYE

Given n (always odd), return output a that has concentric rings of the 1s and 0s around the center point. Examples: Input ...

circa 5 anni fa

Risolto

Calendar Matrix

Return a calendar matrix for the given values of month and year. Assume that Sunday is the first day of the week. The resulting ...

circa 5 anni fa

Risolto

Diagonal of a Spiral Matrix

Write a function that will return same output as diag(spiral(n)). The only exception is that spiral and diag functions are not a...

circa 5 anni fa