Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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]

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Carica altro