Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector.
Example:
...
3 mesi fa
Risolto
Sum All Positive Elements
Output a scalar that is equal to the sum of all positive elements in a given vector/matrix.
For Example:
The sum of all positi...
3 mesi fa
Risolto
Sum of elements in a vector (★)
(copy of Prob. 3)
Find the sum of all the numbers of the input vector x.
Input x = [1 2 3 5]
Output y is 11
<>
...
Data Regularization
Provided is an m-by-n integer data matrix A whose elements are drawn arbitrarily from a set *S* = [1,2,3,...,S] for any large in...
3 mesi fa
Risolto
Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....
3 mesi fa
Risolto
Area of a circle
Given the radius x, y would be the area of a circle.
Pi = 3.1416
3 mesi fa
Risolto
Return the Square of a Number
Write a function that takes a single numeric input x and returns its square.
That is, given x, your function should output x^2....