문제를 풀었습니다


Narcissistic number ?
Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

4개월 전

문제를 풀었습니다


Simpsons's rule (but not Homer Simpson)
I wonder what Homer Simpson would have thought of Simpson's rule? Somehow I doubt his thoughts would have included the phrase Ne...

4개월 전

문제를 풀었습니다


Differential equation and events
You have to solve the non-linear time variant differential equation: (cos(y)+2)*y''+atan(y)*sin(0.01*t)^2+y*sin(0.5*t)=0 ...

4개월 전

문제를 풀었습니다


Numerical Integration
Input * |x0|, a real number greater than 0 Output * |I|, a numerical estimate of the integral x0 / I...

4개월 전

문제를 풀었습니다


Monte-Carlo integration
Write a function that estimates a d-dimensional integral to at least 1% relative precision. Inputs: * d: positive integer....

4개월 전

문제를 풀었습니다


Weighted Convolution
Given two input vectors x = [x_1, x_2, ..., x_K] and y = [y_1, y_2, ..., y_K] of equal length, compute the weighted convolution ...

4개월 전

문제를 풀었습니다


Cos Function
x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.

4개월 전

문제를 풀었습니다


Sum the real and imaginary parts of a complex number
Sum the real and imaginary parts of a complex number. Example c = 1+2i has the solution 1 + 2 = 3

4개월 전

문제를 풀었습니다


Next Palindrome

4개월 전

문제를 풀었습니다


Sum of the pixel values for the blue color
Calculate the sum of the pixel values for the blue color, with a picture as an input. NOTE: The picture will be provided as a m...

4개월 전

문제를 풀었습니다


Convert hex color specification to MATLAB RGB
Here's something that comes up all the time if you deal with web pages. Given a <http://www.w3schools.com/html/html_colors.as...

4개월 전

문제를 풀었습니다


Let's get back to school, and create multiplication tables
For a given range, create multiplication tables. (start is always < endno) Example start = 17 endno = 19 Then, ...

4개월 전

문제를 풀었습니다


modular arithmetic
Given three integers a,b and c, find the remainder when a^b is divided by c. Here, a^b will be well beyond the largest 64 bit in...

4개월 전

문제를 풀었습니다


Calculate the hypotenuse of a right triangle without using ^ and sqrt ()
Find out the hypotenuse of right triangle. Say a = 4, b = 3 then c = 5 Please don't use ^ and sqrt() function.

4개월 전

문제를 풀었습니다


Moving average (variable kernel length)
Find the moving average in a vector. The kernel length is a variable. For example x = 1:10 kernel_length = 2 would r...

4개월 전

문제를 풀었습니다


Weighted average
Compute the weighted average Y, of the vector A, given the weight vector W. The weighted average is the sum of the dot produc...

4개월 전

문제를 풀었습니다


Negative without '-'
Simple: return a negative number without using the '-' sign. Thanks to Problem <https://www.mathworks.com/matlabcentral/cody/...

4개월 전

문제를 풀었습니다


Calculate the sum of two polynomials
Calculate the sum of two polynomials if they are written in notation with their coefficients. example: () + () = a=[3 4 ...

4개월 전

문제를 풀었습니다


calculate PI without using pi function
There are many methods to get the pi(Ratio of circumference to diameter). You should get pi without using the pi function in M...

4개월 전

문제를 풀었습니다


Calculate cosine without cos(x)
Solve cos(x). The use of the function cos() and sin() is not allowed.

4개월 전

문제를 풀었습니다


Raise a polynomial to a power
In Matlab, polynomials are represented by a vector of coefficients. For example, the polynomial p=a*x^2 + b*x + c is represente...

4개월 전

문제를 풀었습니다


Calculate sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

4개월 전

문제를 풀었습니다


Boustrophedon
Given a vector v and a positive integer n, return an m-by-n matrix containing the elements of v row-wise, alternating left-to-ri...

4개월 전

문제를 풀었습니다


Angle Between Analog Clock Hands
Given a datetime variable t, return the angle (in degrees) between the hour and minute hands of an analog clock at the time repr...

4개월 전

문제를 풀었습니다


Triangle Coordinates
Given a natural number n, return two -element vectors, x and y, containing the coordinates of a triangular arrangement of points...

4개월 전

문제를 풀었습니다


Create block matrix of integers (j+k-1) - Part I
Given m, n, p, and q, create a matrix of m-by-n blocks (submatrices), each sized p-by-q. The elements of the (j,k)th block all h...

4개월 전

문제를 풀었습니다


Split Even Number Into Two Primes
Given an even whole number n (> 2), return a 2-element vector of primes, p, such that p(1) + p(2) = n. The elements of p should ...

4개월 전

문제를 풀었습니다


Determine if Input is Oddish or Evenish (Odd/Even Sum of Digits)
Given a positive integer n, determine whether n is "oddish" or "evenish" - that is, whether the sum of the digits of n is odd or...

4개월 전

문제를 풀었습니다


Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

4개월 전

문제를 풀었습니다


generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

4개월 전

더 보기