문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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)

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


Matrix Pattern 9

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


Matrix Pattern 8

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


Calculate quadrilateral Area: sides and diagonals given

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

더 보기