Solved


Find all vampire fangs
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such th...

7 years ago

Solved


Fangs of a vampire number
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such tha...

7 years ago

Solved


Parasitic numbers
Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...

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


Check if a matrix is a palindrome in all directions
Check if a matrix is a palindrome both vertically and horizontally. You function will return *true* for |[1,2,1]| or |[2,7,2;...

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


Form a square matrix from four square sub-matrices
Create a square matrix, y, from 4 square sub-matrices that will be constructed (x1, x2, x3, x4): y = [x1 x2; x3 x4]; ...

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


Dice face matrix!
This is dice simulator, but instead of making a random die number, you will receive an "pre-rolled" number in and spit out a mat...

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


De-primed
Write a function that will multiply every prime number in the array or matrix by two, leaving all other numbers the same, and re...

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


Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

7 years ago

Solved


Convert a vector of Integers into a matrix of binaries
Convert a vector of positive integers into a matrix containing their binary representation. Each column of the output contains t...

7 years ago

Solved


Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

7 years ago

Solved


A matrix of extroverts
Now that the introverts have had their script, the extroverts spoke up (naturally!) and demanded one as well. You will be given...

7 years ago

Solved


Pancakes for everyone!
Accordingly to the <http://nl.mathworks.com/matlabcentral/cody/problems/42460-the-cake-is-a-lie problem 42460>. All the children...

7 years ago

Solved


Regular polygon bounded by and bounding a circle
As the number of sides (or vertices) of a regular polygon goes to infinity, its perimeter and area go to the perimeter and area ...

7 years ago

Solved


Fun with a compass
Each night for the past week, you have been having the same nightmare: You find yourself back in your junior high school geometr...

7 years ago

Solved


Minimal cost
A power house, P, is on one bank of a straight river W meters wide, and a factory, F, is on the opposite bank L meters downstr...

7 years ago

Solved


Find the sides of an isosceles triangle when given its area and height from its base to apex
Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and ...

7 years ago

Solved


Find the Area of a Polygon
Consider 2-D geometry and assume that the points are given in form of rows of a matrix. Find the area of polygon enclosed by the...

7 years ago

Solved


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

7 years ago

Solved


Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...

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

7 years ago

Solved


Avalaible area: wall construction
You need to build a wall to enclose a certain area. Calculate the available area after you build the wall. Assumptions * ...

7 years ago

Solved


Parallel vectors
Return true or false depending on whether 2 vectors are parallel or not. Vectors can be 2 or 3 dimensional. The origin is not c...

7 years ago

Load more