Solved


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

11 years ago

Solved


Sum the real and imaginary parts of a complex number
Sum the real and imaginary parts of a complex number. Example c = 1+2i has the solution 1 + 2 = 3

11 years ago

Solved


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

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

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

11 years ago

Solved


Polite numbers. N-th polite number.
A polite number is an integer that sums of at least two consecutive positive integers. For example _7 = 3+4_ so 7 is a polite...

11 years ago

Solved


Polite numbers. Politeness.
A polite number is ans integer that sums of two or more consecutive nonnegative integers. Politeness of a positive integer is a...

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

11 years ago

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

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

11 years ago

Solved


Does the coin touch the line?
If we throw a coin that has a diameter of d, its center will land in a grid n x m. What is the probability that the coin land...

11 years ago

Solved


Remove the polynomials that have positive real elements of their roots.
The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the <http://www.ma...

11 years ago

Solved


Counting Sequence
Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

11 years ago

Solved


Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

11 years ago

Solved


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

11 years ago

Solved


Omit columns averages from a matrix
Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...

11 years ago

Solved


What number has this problem?
This problem is added because it is problem number *???* in the "Community" problems section. <http://www.mathworks.de/matlab...

11 years ago

Problem


Does the coin touch the line?
If we throw a coin that has a diameter of d, its center will land in a grid n x m. What is the probability that the coin land...

11 years ago | 3 | 41 solvers

Solved


Create an anti-identity matrix
Create an anti-identity matrix of given dimension. Examples n = 2 A = [0 1; 1 0] n = 3 A = [0 0 1; 0 1 0; 1 0 0...

11 years ago

Solved


Numbers spiral diagonals (Part 1)
Inspired by Project Euler n°28 et 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...

11 years ago

Solved


Find indices of diagonal elements
Given a matrix A and a diagonal index d (where 0 indicates the main diagonal and off-diagonals are identified by positive and n...

11 years ago

Solved


Implement a ROT13 cipher
Replace each character in string s1 with the character that is shifted 13 positions from it (wrap back to the beginning if neces...

11 years ago

Solved


Which way to go?
Given an m*n grid, How many ways are there to go from upper left corner to the lower right one? You can only move right...

11 years ago

Solved


Number Persistence
A number's persistence is the number of steps required to reduce it to a single digit by multiplying all its digits to obtain a ...

11 years ago

Solved


Slicing the cube
A bored matlab enthusiast has a cube with volume n^3. He decides to paint the entire surface of the cube red. Then, with slices...

11 years ago

Solved


length of string on cylinder
A cylinder H cm high has a circumference of C cm. A string makes exactly N complete turns round the cylinder while its two ends ...

11 years ago

Solved


rectangle in circle
In the figure below, the rectangle at the corner measures a cm x b cm. What is the radius of the circle in cm? <<http://www....

11 years ago

Solved


Add two different item as shown in example
Add two different item as shown in example x=5; y='ab'; Then output must be'5ab';

11 years ago

Solved


Complex number
For complex number c=a+bi, write code that will add a and b together.

11 years ago

Solved


Remainder
Make 'y' equal to the remainder of 27 divided by 5. When x=27 and t=5

11 years ago

Load more