Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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_ , *...

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Mehr laden