Solved

Find Month & day for given day number of a year

Find Month & day for given day number of a year (day number is any number ranging from 1 to 366)

21 days ago

Solved

Determine if input is a valid AHP evaluation matrix

Input is a matrix. Output is a true or false statement (1 or 0). Return true if input is a valid Analytic Hierarchy Process eval...

22 days ago

Solved

Vectorize the digits of an Integer

Create a vector of length N for an integer of N digits. x = 123045; x_vec = [1 2 3 0 4 5]; I happened upon a trick ...

22 days ago

Solved

Remove all the consonants

Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

23 days ago

Solved

Remove the vowels

Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

23 days ago

Solved

is the number happy?

test is a given integer number is Happy of not? answer 1 if yes or 0 is no

23 days ago

Solved

Dudeney Numbers: Numbers which are the cube of their decimal sum

From Wikipedia: _A Dudeney number is a positive integer that is a perfect cube such that the sum of its decimal digits is equa...

23 days ago

Solved

Factorions: Numbers that equal the sum of the factorials of their digits

From Wikipedia: _A factorion is a natural number that equals the sum of the factorials of its decimal digits_ For example: ...

23 days ago

Solved

Find the sines of an isosceles triangle when given its area and height

Find the sines of an isosceles triangle when given its area and height. For example, when A=60 and h=5, the result is [0.3752...

25 days ago

Solved

Max Change in Consecutive Elements

If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...

26 days ago

Solved

SatCom #1: Wavelength of an electomagnetic wave

*Satellite and Space Engineering - Problem #1* _This is the first of a series of problems looking at topics in satellite and ...

26 days ago

Solved

Make an identity matrix whose diagonal elements are 1:n

For a given input n, make an n by n identity matrix that contains the elements 1:n along its diagonal. For example, if input=5: ...

26 days ago

Solved

Reepeating numbers in array

Repeating numbers in array In = [1 0 0 0 2 0 0 0 3 0 0 0 0 0 5 0 0 0 0]. Out = [1 1 1 1 2 2 2 2 3 3 3 3 3 3 5 5 5 5 5].

27 days ago

Solved

How unique?

Sometimes, when we check unique entries of vector we would like to know how many times each value occurs. Given vector of num...

27 days ago

Solved

Largest territory

Determine whose territory is largest. If there are multiple numbers tied for the largest territory, return the smallest number. ...

27 days ago

Solved

Kepler's Equation

Solve <http://en.wikipedia.org/wiki/Kepler's_equation Kepler's Equation>. Note that the solution is rounded down to 5 decima...

28 days ago

Solved

Replace pattern 0 1 0 and 1 0 1

Find and replace a pattern in a row of zeroes and ones. * Find 1 0 1 and replace it with 1 1 1 * Find 0 1 0 and replace it w...

1 month ago

Solved

Time Expansion

How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

1 month ago

Solved

Matrix indexing with two vectors of indices

Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

1 month ago

Solved

Reindex a vector

You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

1 month ago

Solved

D'Hondt Method of Proportional-Representation

The D'Hondt method is a proportional representational method for allocating seats to parties in an election. <https://en.wiki...

1 month ago

Solved

~~~~~~~ WAVE ~~~~~~~~~

|The WAVE generator| Once upon a time there was a river. 'Sum' was passing by the river. He saw the water of the river that w...

1 month ago

Solved

expand intervals

You're given a row vector of an even number of monotonically increasing integers. Each pair of consecutive integers is the lower...

1 month ago

Solved

Remove the air bubbles

Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

1 month ago

Solved

Colon operator of two vectors

You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

1 month ago

Solved

Love triangles

Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

1 month ago

Solved

Set x value to each even index of vector y.

Set x value to each even index of vector y.

1 month ago