문제를 풀었습니다


Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given number of...

8일 전

문제를 풀었습니다


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

8일 전

문제를 풀었습니다


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

8일 전

문제를 풀었습니다


Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

8일 전

문제를 풀었습니다


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not to use d...

8일 전

문제를 풀었습니다


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

8일 전

문제를 풀었습니다


Inner product of two vectors
Find the inner product of two vectors.

8일 전

문제를 풀었습니다


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

8일 전

문제를 풀었습니다


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

10일 전

문제를 풀었습니다


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

12일 전

문제를 풀었습니다


calculate the length of matrix
input 1 array, calculate the length

12일 전

문제를 풀었습니다


Simple equation: Annual salary
Given an hourly wage, compute an annual salary

12일 전

문제를 풀었습니다


Convert radians to degrees
Given input in radians, output to degrees

12일 전

문제를 풀었습니다


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

12일 전

문제를 풀었습니다


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

12일 전

문제를 풀었습니다


Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

12일 전

문제를 풀었습니다


Check if number exists in vector
Return 1 if number a exists in vector b otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,2,3]; Returns 1.

12일 전

문제를 풀었습니다


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

12일 전

문제를 풀었습니다


Find max
Find the maximum value of a given vector or matrix.

12일 전

문제를 풀었습니다


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

12일 전

문제를 풀었습니다


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

12일 전

문제를 풀었습니다


Create a vector
Create a vector from 0 to n by intervals of 2.

12일 전

문제를 풀었습니다


Is my wife right?
Regardless of input, output the string 'yes'.

12일 전

문제를 풀었습니다


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

12일 전

문제를 풀었습니다


Zero or hero
A number will be given as an input. You can be hero if it's not zero. (Just for fun)

12일 전

문제를 풀었습니다


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Input...

12일 전

문제를 풀었습니다


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

12일 전

문제를 풀었습니다


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<https://i.imgu...

12일 전

문제를 풀었습니다


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

12일 전

문제를 풀었습니다


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

12일 전

더 보기