Solved

Rotate and display numbered tile

Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

circa un mese ago

Solved

Matrix Construction I

Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

circa un mese ago

Solved

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 un mese ago

Solved

The Matrix Construction

Given two input ,first one is CN (Column Number), Second one is Dim Can you produce such a matrix for example CN=6; Dim=2 ...

circa un mese ago

Solved

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 un mese ago

Solved

Generate this matrix

For a given odd integer n, generate a matrix as follows: Input: n = 5; Output: [ 2 1 0 0 0 1 ...

circa un mese ago

Solved

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 un mese ago

Solved

Rainbow matrix

Create a "rainbow matrix" as described in the following examples Input = 3 Output = [ 1 2 3 2 3 2 ...

circa un mese ago

Solved

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 un mese ago

Solved

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 un mese ago

Solved

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 un mese ago

Solved

Generate this matrix

Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

circa un mese ago

Solved

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 un mese ago

Solved

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 un mese ago

Solved

Find best domino orientation

Given a list of pairs, find the orientation they should be placed in a line, such that the sum of the absolute values of the dif...

2 mesi ago

Solved

Choose the best fitting dominoes

You will be given a cell array of nx2 matrices. Choose one row from each matrix. These are the ordered pairs that will be plac...

2 mesi ago

Solved

Find best placement for ordered dominoes (harder)

Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

2 mesi ago

Solved

Find perfect placement of non-rotating dominoes (easier)

Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

2 mesi ago

Solved

Chess probability

The difference in the ratings between two players serves as a predictor of the outcome of a match (the <http://en.wikipedia.org/...

3 mesi ago

Solved

jogging?

Imagine x-y coordinate system and you are at the origin and your partner is on the x-axis at some small distance (d) away from y...

3 mesi ago

Solved

Easy Sequences 12: 50th Prime

Write a function that outputs the th prime after a given number . For example, the th prime after is . NOTE: If itself is pr...

3 mesi ago

Solved

Approximation of Pi (vector inputs)

Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

3 mesi ago

Solved

Approximation of Pi

Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

3 mesi ago

Solved

geometric progression

I've modified my <http://uk.mathworks.com/matlabcentral/cody/problems/2800-arithmetic-progression previous program> so that it n...

3 mesi ago

Solved

arithmetic progression

I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

3 mesi ago

Solved

Largest Geometric Series

Extension of Ned Gulley's wonderful <http://www.mathworks.com/matlabcentral/cody/problems/317 Problem 317>. In a geometric se...

3 mesi ago

Solved

Find similar sequences

Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...

3 mesi ago

Solved

Generate Square Wave

Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...

3 mesi ago

Solved

Sum of series VII

What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

3 mesi ago

Solved

Sum of series VI

What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

3 mesi ago