Soonpyo Kwon
Content Feed
문제를 풀었습니다
Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...
2년 초과 전
문제를 풀었습니다
Sunday bonus
Submit a solution on any Sunday and you will get 10 points. Only for MATLAB fans!
2년 초과 전
문제를 풀었습니다
Extract part elements of matrix into one new matrix
Given a matrix that includes different nonzero and zero entries, extract the nonzero elements and form a new matrix. The new mat...
2년 초과 전
문제를 풀었습니다
Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...
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년 초과 전
문제를 풀었습니다
Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...
2년 초과 전
문제를 풀었습니다
Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...
2년 초과 전
문제를 풀었습니다
Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
2년 초과 전
문제를 풀었습니다
Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...
2년 초과 전
문제를 풀었습니다
Determinant of a 3x3 Matrix
Return the determinant of a 3x3 matrix. The built-in Matlab function det is not allowed.
2년 초과 전
문제를 풀었습니다
Sum of first n positive integers
Given n, find the sum of first n positive integers Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these terms is 55
2년 초과 전
문제를 풀었습니다
Find the position of first minimum value in an integer array with numbers
If x = [2 6 4 9 10 3 1 5 1] the the output should be 7, because the first minimum value (1) lies at the 7th position.
2년 초과 전
문제를 풀었습니다
Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27
2년 초과 전
문제를 풀었습니다
Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...
2년 초과 전
문제를 풀었습니다
Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...
2년 초과 전
문제를 풀었습니다
Convert from Fahrenheit to Celsius
Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...
2년 초과 전
문제를 풀었습니다
Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<https://i.imgur.com/jlZDHhq.png>> Image courtesy of <http://up...
2년 초과 전