Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector.
Example:
...
3 years 前
已解决
Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at http://en.wikipedia...
3 years 前
已解决
Narcissistic number ?
Inspired by Problem 2056 created by Ted.
In recreational number theory, a narcissistic number is a number that is the sum of ...
3 years 前
已解决
Four quadrant inverse tangent function.
Create a function that returns an array P the same size as X and Y containing the element-by-element, four-quadrant inverse tang...
Make a run-length companion vector
Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...
3 years 前
已解决
Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...