Solved


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

7 years ago

Solved


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

7 years ago

Solved


With apologies to William Blake
Coder Coder, typing fast Sitting at your desk, aghast. What immortal MATLAB script will solve this problem, nice and qu...

7 years ago

Solved


Big numbers, repeated least significant digits
This problem builds off of <http://www.mathworks.com/matlabcentral/cody/problems/3077-big-numbers-least-significant-digits/ Prob...

7 years ago

Solved


Evened up (or not)
You will be provided with an array or matrix that contains various numbers, in addition to an evening variable, e, set to 1 or 0...

7 years ago

Solved


Find out the Gray Code for a Given Binary Number
Find out <http://en.wikipedia.org/wiki/Gray_code Gray Code> for a given binary number Example Binary input 1000 Gray ...

7 years ago

Solved


It's going down. We're finding simbers!
This problem is inspired by Project Euler 520: Simbers. "We define a simber to be a positive integer in which any odd digit, ...

7 years ago

Solved


Pandigital Factors (Based on Euler 491)
A Pandigital Number is a number containing all of the digits from 0-9 inclusive, with the added stipulation that it does not hav...

7 years ago

Solved


Odd elimination
Inspired by Project Euler problem #539 You'll be given a vector from 1 to n; Going from left to right, remove the first n...

7 years ago

Solved


Pseudo Square Root (Inspired by Project Euler 266)
Shamelessly copied from the Project Euler page for Problem 266: ------------- The divisors of 12 are: 1,2,3,4,6 and 12. T...

7 years ago

Solved


Bouncy numbers
Inspired by Project Euler n°112. * * Working from left-to-right if no digit is exceeded by the digit to its left it is call...

7 years ago

Solved


Project Euler: Problem 11, Largest product in a grid
What is the greatest product of _k_ adjacent numbers in the same direction (up, down, left, right, or diagonally) in a _n×n_ gri...

7 years ago

Solved


Large Sum (inspired by Project Euler 13)
Your function will be provided an arbitrary number of numbers of arbitrary sizes as a cell array of strings. Some numbers will b...

7 years ago

Solved


Consecutive Equation Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on the largest consecutive run of ...

7 years ago

Solved


Equation Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on times that include the four bas...

7 years ago

Solved


Create a square matrix with given conditions
Create a square matrix, M, which should be populated as follows: M = [ n^2 n * (n-1) n * (n-2) ... n * 2 n * ...

7 years ago

Solved


create a square matrix
create a [n*n] matrix. example: mat(4)= [ 1 4 9 16 4 4 9 16 9 9 ...

7 years ago

Solved


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

7 years ago

Solved


Make a rainbow matrix (follow-up to checkerboard matrix)
Given an integer n, make an n-by-n matrix as shown below. The a(1,1) should be 0. As we move away from the top-left, the number ...

7 years ago

Solved


Union Jack Matrix
Create a matrix of odd dimensions that has ones on both diagonals and dividing the matrix into 4 quadrants, resembling a square ...

7 years ago

Solved


Tent matrix
Create an n x n matrix that resembles one kind of tent. The variable n is provided to the function and will be an odd number. As...

7 years ago

Solved


Vandermonde Matrix
Create the Vandermonde Matrix of the given vector. The matrix consists of columns as powers of the vector, so the first column i...

7 years ago

Solved


Big numbers, least significant digits
Given two numbers, x and n, return the last d digits of the number that is calculated by x^n. In all cases, d will be the number...

7 years ago

Solved


Fill the Matrix - 2
Input is a column vector and n. n columns will be added to the left of the input column. The first value of the row is the me...

7 years ago

Solved


Replace secondary diagonal elements of a square array
Replace all the secondary diagonal elements of the square array A with the number n Example: A = [1 2 3 4 5 6 ...

7 years ago

Solved


MatCAT - Reconstruct X from Its X-rays
Consider a matrix x x = [ 1 2 0 0 5 0 3 0 8 ] If we sum x along the rows we get row_sums = [3 5 11] ...

7 years ago

Solved


Matrix to 3-Column Matrix
Consider a matrix *A* such as A = [1 2 3 3 4 5 6; 2 3 4 5 6 7 8]; Can you convert this matrix to a three-column ...

7 years ago

Solved


Vector to 3-Column Matrix
Consider a vector *A* such as A = [1 2 3 3 4 5 6] Can you convert this vector to a three-column matrix like this: ...

7 years ago

Solved


Find the Final State of an Abelian Sandpile
Let us define an <http://nautil.us/issue/23/dominoes/the-amazing-autotuning-sandpile Abelian sand pile> as a matrix that is only...

7 years ago

Solved


Maximum of each diagonal
The well-known <http://www.mathworks.com/help/matlab/ref/max.html max> function can operate along either the rows or the columns...

7 years ago

Load more