A résolu


N-Queens Checker
Picture a chessboard populated with a number of queens (i.e. pieces that can move like a queen in chess). The board is a matrix,...

plus de 11 ans il y a

A résolu


Double Deal
*Description* Given an input vector _v_, return the first element as the first output, the second element as the second outpu...

plus de 11 ans il y a

A résolu


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

plus de 11 ans il y a

A résolu


Sum of big primes without primes
Inspired by Project Euler n°10 (I am quite obviously a fan). With problem n°250 by Doug, you can find some global methods to ...

plus de 11 ans il y a

A résolu


Golomb's self-describing sequence (based on Euler 341)
The Golomb's self-describing sequence {G(n)} is the only nondecreasing sequence of natural numbers such that n appears exactly G...

plus de 11 ans il y a

A résolu


Eight Queens Solution Checker
Write a function to verify whether an arrangement of queens on a chessboard is a valid solution to the classic <http://en.wikipe...

plus de 11 ans il y a

A résolu


Pandigital number n°3 (Inspired by Project Euler 32)
After Problem 2319 and 2320. An n-digit number is pandigital if it makes use of all the digits 1 to n exactly ONCE. For examp...

plus de 11 ans il y a

A résolu


Pandigital number n°2 (Inspired by Project Euler 32)
After <http://www.mathworks.com/matlabcentral/cody/problems/2319 Problem 2319>. An n-digit number is pandigital if it makes u...

plus de 11 ans il y a

A résolu


Pandigital number n°1 (Inspired by Project Euler 32)
A little warm-up to begin... An n-digit number is pandigital if it makes use of all the digits 1 to n exactly ONCE. For ex...

plus de 11 ans il y a

A résolu


Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

plus de 11 ans il y a

A résolu


I've got the power! (Inspired by Project Euler problem 29)
Consider all integer combinations of a^b and b^a for the integer values 2 ≤ a ≤ 4 and 2 ≤ b ≤ 5: 2^2=4, 2^3=8, 2^4=16,...

plus de 11 ans il y a

A résolu


Circular Primes (based on Project Euler, problem 35)
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. The...

plus de 11 ans il y a

A résolu


Lychrel Number Test (Inspired by Project Euler Problem 55)
The task for this problem is to create a function that takes a number _n_ and tests if it might be a Lychrel number. This is, re...

plus de 11 ans il y a

A résolu


edge detection
write a function that gives the indexes of rising or falling edge x is a vector (assume it contains always at least one eleme...

plus de 11 ans il y a

A résolu


Matrix rotation as per given angle
Given a user defined matrix and angle of rotation, rotate the elements of output matrix as clockwise or anti-clockwise. Angle wi...

plus de 11 ans il y a

A résolu


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

plus de 11 ans il y a

A résolu


calculate linear convolution two vectors
for e.g in: a = [1 2 3] b = [4 5 6] out: y = [4 13 28 27 18]

plus de 11 ans il y a

A résolu


Create One Large Eye of size N x N Quickly?
*<http://en.wikipedia.org/wiki/Aye_(yes) Aye !!!>*

plus de 11 ans il y a

A résolu


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

plus de 11 ans il y a

A résolu


Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

plus de 11 ans il y a

A résolu


construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x. E...

plus de 11 ans il y a

A résolu


Minefield Sonar
*Background* In mine-hunting games (e.g. Microsoft Minesweeper), the user is provided with a covered grid that, upon a left c...

plus de 11 ans il y a

A résolu


Nilpotent matrix
Check if matrix A is <http://mathworks.com/ nilpotent>.

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

plus de 11 ans il y a

A résolu


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

plus de 11 ans il y a

A résolu


Determine if input is a perfect number
A <http://en.wikipedia.org/wiki/Perfect_number/ perfect number> occurs whent the sum of all divisors of a positive integer, exce...

plus de 11 ans il y a

A résolu


commutative?
Given the handle to a binary function that takes two ordinary numbers, test if the function is commutative.

plus de 11 ans il y a

A résolu


Reverse a matrix
Its simple. You have to reverse a given matrix.

plus de 11 ans il y a

A résolu


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

plus de 11 ans il y a

Charger plus