Solved


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

11 months ago

Solved


Spot the rectangle
This problem is related to the 17x17 challenge. Given a matrix filled with ones and zeros, determine whether or not any rectangl...

11 months ago

Solved


Spot the rectangle (Part 2)
This problem is related to the 17x17 challenge. See also Part 1 of this problem. Given a matrix in which each element is either ...

11 months ago

Solved


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

11 months ago

Solved


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

11 months ago

Solved


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

11 months ago

Solved


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

11 months ago

Solved


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

11 months ago

Solved


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

11 months ago

Solved


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

11 months ago

Solved


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

11 months ago

Solved


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

11 months ago

Solved


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

11 months ago

Solved


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

11 months ago

Solved


Easy Sequences 17: Mu Variant Function
The mobius function is an important arithmetic function. It is often represented by the Greek letter mu (μ), and is sometimes ca...

11 months ago

Solved


Easy Sequences 35: Cutting a donut to Semi-prime pieces
The figure below illustrates how a torus (donut shape) can be cut in pieces with only cuts: ...

11 months ago

Solved


Easy Sequences 37: Natural Factorable Polynomials
A polynomial of the form: , for , is said to be natural factorable if it can be factored into products of first degree binomials...

11 months ago

Solved


Easy Sequences 22: Sum of Proper Fractions
Let 'F' be the set of all proper fractions in lowest term, whose denominator is less than or equal 'd'. So, for d = 10, we have:...

11 months ago

Solved


Easy Sequences 15: Pythagorean Area with maximum Hypotenuse
A pythagorean triangle is defined as a right triangle with all three sides having integer lengths. Examples of pythogorean trian...

11 months ago

Solved


Easy Sequences 19: Length of Prime-sided Rectangle with Maximum Area
A prime-sided rectangle is a rectangle having sides represented by prime numbers. The figure below shows all the possible prime-...

11 months ago

Solved


Easy Sequences 36: Hyperbolic Lattice Points
The graph, shown below, of the hyperbola: , passes through four positive lattice points:. ...

11 months ago

Solved


Easy Sequences 20: Counting Prime-sided Rectangles
A prime-sided rectangle is a rectangle having sides represented by prime numbers. The figure below shows all the possible prime-...

11 months ago

Solved


Easy Sequences 29: Odd proper divisors of odd proper divisors
The number is special. It has odd number of proper divisors: . Furthermore, if you take any of its proper divisors, say , it t...

11 months ago

Solved


Easy Sequences 7: Easy as Composite Pi
The prime Pi function is defined as the number of prime numbers from 1 to a certain given limit. In MATLAB, it is easy to create...

11 months ago

Solved


Easy Sequences 30: Nearly Pythagorean Triangles
A Nearly Pythagorean Triangle (abbreviated as "NPT'), is an integer-sided triangle whose square of the longest side, which we wi...

11 months ago

Solved


Easy Sequences 24: Number of Coprime Lattice Points
Given a number 'n', you were tasked to mark and count all coprime lattice points at the first quadrant bounded by the points (0,...

11 months ago

Solved


Easy Sequences 8: Triangles with integer sides and prime perimeters
The triangle below is special. It has integer sides and a prime perimeter. Given an integer "n" we want to know how many t...

11 months ago

Solved


Easy Sequences 34: Modified Pascal's Triangle
Consider the integer triangle below: It follows the same ...

11 months ago

Solved


Easy Sequences 26: Prime-Integer Line Segments
At the first quadrant in the -plane, you are asked to construct a line segment with the following specifications: Select a prim...

11 months ago

Solved


Easy Sequences 33: Web Trapped Ant
An ant is trapped on a spider web inside a can with open top. The can has a radius and height . A spider sitting on the outside...

11 months ago

Load more