문제를 풀었습니다


Basic Monte Carlo Simulation
Input is a matrix including service time and probability of service time. Another input is a random number. Function should tran...

거의 8년 전

문제를 풀었습니다


Perfect square.
Determine if the input is a perfect square or not. Example - If input is 25, return 1. If input is 17, return 0.

거의 8년 전

문제를 풀었습니다


Calculate time taken by light to reach earth surface
We know the time(seconds) taken by light to reach surface of earth. What if the distance varies yearly or source of light moves ...

거의 8년 전

문제를 풀었습니다


Extract leading non-zero digit
<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

거의 8년 전

문제를 풀었습니다


Happy 2013...
Happy 2013, everyone! An interesting tidbit about 2013 is that it is the first year since 1987 to contain four different digits...

거의 8년 전

문제를 풀었습니다


Create tangent function out of sin and cos
Please don't use tan(x) directly

거의 8년 전

문제를 풀었습니다


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

거의 8년 전

문제를 풀었습니다


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

거의 8년 전

문제를 풀었습니다


Create tangent function out of sine function only
Please don't use cosine and tangent functions

거의 8년 전

문제를 풀었습니다


Rotate matrix by -90 degrees
Rotate a Matrix by -90 degrees Example: X = 1 2 3 4 5 6 7 8 9 output = 7 4 ...

거의 8년 전

문제를 풀었습니다


Linear system of equations
Solve the system of equations in three variables.

거의 8년 전

문제를 풀었습니다


Number of primes
Count the number of primes less than 'n'.

거의 8년 전

문제를 풀었습니다


Create sine function out of cosine
Please don't use sin(x) directly

거의 8년 전

문제를 풀었습니다


Determinant of a 3x3 Matrix
Return the determinant of a 3x3 matrix. The built-in Matlab function det is not allowed.

거의 8년 전

문제를 풀었습니다


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

거의 8년 전

문제를 풀었습니다


Temperature question
get the temperature...in celcius

8년 초과 전

문제를 풀었습니다


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

8년 초과 전

문제를 풀었습니다


Determine given vector is even or odd
Find the numbers of the input vector is odd or even then replace even with 1 and odd with 0 Example x = [ 3 3 4 6 1] ...

8년 초과 전

문제를 풀었습니다


Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

8년 초과 전

문제를 풀었습니다


Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

8년 초과 전

문제를 풀었습니다


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

8년 초과 전

문제를 풀었습니다


Distance walked 3D
suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

8년 초과 전

문제를 풀었습니다


"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

8년 초과 전

문제를 풀었습니다


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

8년 초과 전

문제를 풀었습니다


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

8년 초과 전

문제를 풀었습니다


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

8년 초과 전

문제를 풀었습니다


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

8년 초과 전

문제를 풀었습니다


Exponential decay
Many dynamic processes can be approximated as an exponential decay. This applies to radioactive decay, some chemical reactions, ...

8년 초과 전

문제를 풀었습니다


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

8년 초과 전

문제를 풀었습니다


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

8년 초과 전

더 보기