Solved


Mongean Shuffle
A Mongean shuffle of an n card deck starts with putting the initial deck on the left hand side. * The top card of the deck is...

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

8 years ago

Solved


Number of occurrences of letter in a text
Given an input text either as a string or as a cell array of strings, return a (1 x 26) matrix containing the number of occurren...

8 years ago

Solved


Multiply two polynomials p and q given in in vector representation.
Multiply two polynomials p and q given in vector representation. Example p=[-2 0 1 -1 3 2] q=[1 0 -1 2 ...

8 years ago

Solved


Find the diagonal of the square of side L
You are given a square of side length L, find D the length of its diagonal.

8 years ago

Solved


Create vector as shown in test cases
Create vector as shown in test cases

8 years ago

Solved


determine if
determine if the elements of a matrix is a nan and return true

8 years ago

Solved


Matrix element wise multiplication
Take two incoming vectors, and multiply them element wise

8 years ago

Solved


Does this dress make me look fat
For the input string "Does xyz make me look fat" output the string "No, xyz does not make you look fat"

8 years ago

Solved


Find my daddy long leg (No 's')
Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.

8 years ago

Solved


prime to each other
Given two integers n1, n2 greater than 1, find out if they have common divisors or are prime to each other. Return "true" if the...

8 years ago

Solved


Weighted average
Compute the weighted average Y, of the vector A, given the weight vector W. The weighted average is the sum of the dot produc...

8 years ago

Solved


Calculate correlation.
There are two data. y1=[0 1 2 3 4]' y2=[2 3 4 5 6]' We can see positive relationship between y1 and y2. The relations...

8 years ago

Solved


Select primes from the matrix.
Select primes from the matrix.

8 years ago

Solved


Global usage
This Challenge is to utilize Global variables. Global variables are risky as the subroutine may inadvertently and unwantingly...

8 years ago

Solved


Find the sum of the largest two elements in a vector
With this one, you have to find the two largest elements in a vector and output the sum of those numbers.

8 years ago

Solved


How many unique Pythagorean triples?
For a given integer |n|, return all <https://en.wikipedia.org/wiki/Pythagorean_triple Pythagorean triples> that inlude numbers s...

8 years ago

Solved


Make blocks of color
Given a (Nx3) sequence of RGB colors, I want to create a (numRowBlocks x numColBlocks x 3) image comprising (blockSize x blockSi...

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

8 years ago

Solved


Find the next square number
Given one or more integers n, find the next integer that is a square, for each of them. Example 1: n = 1; out = 4; ...

8 years ago

Solved


Chicken Race
2 chickens, Pete and Fred, compete in a 100 meter race. Pete runs at a velocity of vp meter/second and Fred is slower, running ...

8 years ago

Solved


Get derivarive of polynomial given as vector array.
Get derivarive of polynomial given as vector array. Example p=[ 1 2 0 5 0 3 ]; result=[ 5 8 0 10 ...

8 years ago

Solved


intervals
Write a function that takes an interval from a to b, and divides it into 6 parts.

8 years ago

Solved


Calculate the hypotenuse of a right triangle without using ^ and sqrt ()
Find out the hypotenuse of right triangle. Say a = 4, b = 3 then c = 5 Please don't use ^ and sqrt() function.

8 years ago

Solved


Find two triangular numbers whose sum is input.
Find two triangular numbers whose sum is _input_. Note: The difference beetween the triangular numbers should be minimum.

8 years ago

Solved


Find Missing Number
A little problem (inspired by CodeChef) for the coffee break. A friend give you an array of size n-1 integers and these int...

8 years ago

Solved


Numeric array to cell array of strings (easy)
Given a numeric array (A) and a 1xk cell array of strings (C), return a cell array (B) that is the same size as A and in which e...

8 years ago

Solved


Add the even numbers
Add only the even numbers of x example: x = [1 2 3 4 5] the positive numbers are: 2 4, so their sum is 6

8 years ago

Solved


DC-DC boost converter
Find the output voltage of a DC-DC boost converter when its input voltage is 12V and the duty cycle ratio is 0.6.

8 years ago

Solved


Free-time Equation
Given a 7-day week, an *_nc_* -number of *_tc_* -hour classes, *_ta_* -hours awake in a day, and *_tw_* -hours that you work in ...

8 years ago

Load more