Fill a zeros matrix (★★★★★)
(Copy of Problem 830)
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for t...
*Prime number check 2 (in construction)
Another way to see if a number is prime is to count the number of factors. For example,
the number 4 has 2 factors, [ 2 4 ]...
4 years ago
Solved
Median computation (★★★)
See easy edition of this problem. However, now you must
compute the median of any real-valued vector without using the in-built...
4 years ago
Solved
Variance computation (★★★)
Given a vector x with several values, compute the variance, whose formula is given by:
<<https://i.imgur.com/Wg95KBE.gif>>
...
4 years ago
Solved
Mo money, mo math #2! (★★★)
(adapted from Prob 9 Cody team)
You have a matrix for which each row is a person and the columns represent the number of quar...
4 years ago
Solved
Prime number check (★★)
One way to see if a number x is prime is to compute the remainders obtained when dividing x by all integers from 2 to √(x). If x...
4 years ago
Solved
Function 1 (★)
Compute the value of
<<https://i.imgur.com/AxKWLmE.gif>>
for any given positive x.
4 years ago
Solved
Sum of terms in a series 1 (★★★)
Given x and n, compute the following sum:
|x|+|x|^(1/2)+|x|^(1/3)+|x|^(1/4)+|x|^(1/5) ... + |x|^(1/n)
where ||x|| indica...
4 years ago
Solved
Mo money, mo math 1! (★★★)
(adapted from Prob 9 Cody team)
You have a vector where the elements represent the number of $20 bills, $10 bills, $5 bills, ...
4 years ago
Solved
Create logarithmically spaced values (★)
Given three numbers a,b,n with b>a, create a vector y with n logarithmic spaced values between 10^a and 10^b.
Thus, if a = -2, ...
Method of Common Differences part-1
Use the method of common differences to output a vector containing the initial values and the nth order difference.
ex
...