문제를 풀었습니다


Portfolio diversification: choose your stocks !
we have the returns of 3 stocks for the last 4 years and we have to combine only 2 stocks that are less correlated. Example: ...

5년 초과 전

문제를 풀었습니다


remove every row&col for every nan
for a given matrix, remove the row and column of every nan. Example x=[1 2 NaN 4 5 6 7 8 ...

5년 초과 전

문제를 풀었습니다


continuous compounding
what's the present value of having 100 dollars after n years given a continuously compounded rate i ? keep only 2 decimals pleas...

5년 초과 전

문제를 풀었습니다


Writing Error Messages
Well written functions check inputs to make sure the input is valid. The function ErrorCheck takes three arguments: * a - a s...

5년 초과 전

문제를 풀었습니다


Tax Calculator
Calculate the tax for a given income. 10% tax is paid for any income up to $2,000. 20% tax is paid for additional income u...

5년 초과 전

문제를 풀었습니다


Add a vector to a matrix
Given a matrix |mat| of size |mXn| and a row vector |v| of size |1Xs|, return a matrix with |m+1| rows that conatains |mat| over...

5년 초과 전

문제를 풀었습니다


Moving Median Absolute Deviation
The median absolute deviation (MAD) is defined as MAD = median(abs(A − median(A))) for a rolling window of length n. For...

5년 초과 전

문제를 풀었습니다


Sum of combinations
Input: *X = 40*, *Y = [40 20 10 4]* Output: *Z = [1 0 0 0; 0 2 0 0; 0 1 2 0; 0 1 1 3; 0 1 0 5; 0 0 4 0; 0 0 3 3; 0 0 2 5; 0 ...

5년 초과 전

문제를 풀었습니다


The twelve days of Christmas
Traditionally there are twelve days of Christmas to celebrate ("Twelvetide"), typically starting with Christmas Day (25 December...

5년 초과 전

문제를 풀었습니다


How many unique Pythagorean triples?
For a given integer |n|, return all <https://en.wikipedia.org/wiki/Pythagorean_triple Pythagorean triples> that inlude numbers s...

5년 초과 전

문제를 풀었습니다


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

5년 초과 전

문제를 풀었습니다


Friday or not
I love Friday. Please tell me whether the day is Friday. Dateformat is 'yyyy-mm-dd' or 'dd-mmm-yyyy' or 'mm/dd/yyyy'. Exa...

5년 초과 전

문제를 풀었습니다


Calculate the CIRCUMFERENCE of circle.
Given the radius is 2, the circumference will be 12.5663.

5년 초과 전

문제를 풀었습니다


Separate even from odd numbers in a vector - with a loop
*Using a loop*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the end. T...

5년 초과 전

문제를 풀었습니다


Shuffle
Shuffle a vector by breaking it up to segments of |n| elements, and rearranging them in a reversed order. For example, the ve...

5년 초과 전

문제를 풀었습니다


Approximate the cosine function
Without using MATLAB trigonometric functions, calculate the cosine of an argument |x| to a precision of |0.0001| *Hint:* You ...

5년 초과 전

문제를 풀었습니다


Capitilize the first letter of every word in a string
For a given input string, capitalize every letter at the beginning of a word, and transform the rest of the letters to lower-cas...

5년 초과 전

문제를 풀었습니다


Get a new matrix by mapping each element of an arbitrary-sized input matrix using lookup table
A is a matrix of any size and dimension. Each element of matrix A belongs to the set S of natural numbers up to N. B is a vector...

5년 초과 전

문제를 풀었습니다


Find the repeating elements and repetitions of a row vector.
So let's say that x is a vector, for example, x = [4, 4, 5, 5, 5, 6, 7, 7,8, 8, 8, 8] Now we want to get the following two ve...

5년 초과 전

문제를 풀었습니다


Normie Function
So, I built a function and gave it a name- _Normie_. *Find the nth term of Normie function:* _f(n)= 1*f(n-1)+ 2*f(n-3)+ 3_ , *...

5년 초과 전

문제를 풀었습니다


Normie Function (2)
Another _Normie Function_ defined as _f(n)= f(n-1)+f(n-2)+f(n-3)_ , *when n>3* and _1_ , *when n<=3*. *Find the nth term of this...

5년 초과 전

문제를 풀었습니다


¿Es una parábola?
Dados los datos de las magnitudes _*x*_ e _*y*_, crear una función que permita conocer si se trata de una parábola o no, indican...

5년 초과 전

문제를 풀었습니다


¡Puntos de corte!
Crea una función que permita calcular los puntos de corte con los ejes X e Y de una función cuadrática indicada por el usuario e...

5년 초과 전

문제를 풀었습니다


¿Es una función exponencial?
Crea una función que permita analizar si los datos dados por el usuario ( *x* e *y*) se relacionan por medio de una función expo...

5년 초과 전

문제를 풀었습니다


Day counter function
Write a function called _day_counter_ that returns the number of Mondays that fell on the first day of the month in a given year...

5년 초과 전

문제를 풀었습니다


Second Diagonal
Transpose the matrix from it's second diagonal.

5년 초과 전

문제를 풀었습니다


Find prime number couples
Given a vector a, which will always contain at least one pair of prime numbers couple, return a matrix called 'couple' in which ...

5년 초과 전

문제를 풀었습니다


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

5년 초과 전

문제를 풀었습니다


Numbers on 7-segment
This is a 7-segment: _ |_| |_| It's a 3-by-3 char matrix.It has made by 3 characters: '_' , '|' and ' ' (space...

5년 초과 전

문제를 풀었습니다


Prime Product
My professor has given a sequence of N numbers as a1, a2, ..., aN and asked me to find the smallest possible value of ai * aj su...

5년 초과 전

더 보기