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 2 ans il y a

A résolu


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

plus de 2 ans il y a

A résolu


Response of First Order Control Systems
In practice, the input signal to an automatic control system is not known ahead of time but usually random in nature. Thus, in t...

plus de 2 ans il y a

A résolu


Separate even from odd numbers in a vector - without loops
*Without using loops*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the...

plus de 2 ans il y a

A résolu


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)

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


Matrix Pattern 9

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


Matrix Pattern 8

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

Charger plus