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 years ago
Solved
Vector push
Append an element |x| to the end of the vector |v| and return both the extended vector and the new number of its elements. |x| c...
5 years ago
Solved
Identify Wagstaff primes
The numbers 3, 43, and 2731 are examples of <https://mathworld.wolfram.com/WagstaffPrime.html Wagstaff primes>.
Write a func...
Count the numbers
In a array x, count the number of times the number n appears in x.
for example: x = [1 2 3 4 3 2 1 2] and n = 2 the answer sh...
5 years ago
Solved
Odd times 3
Given a input matrix x, multiply all odd values by 3. Even values remain the same.
example:
x = [1 2 3 4 5;...
6 7...
5 years ago
Solved
Create times-tables (★★★)
(copy of prob 33)
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 ti...
5 years ago
Solved
Magnitude of a vector (★★★)
Given a vector x with values [ x1, x2, x3, ..., xn ], compute the magnitude (or length) of the vector which is given by
<<htt...
5 years ago
Solved
Doubling elements in a vector (★★)
(copy of prob. 1024)
Given the vector A, return B in which all numbers in A are doubling. So for:
A = [ 1 5 8 ]
t...
Kelvin to Fahrenheit
You can find a doc about it in here => https://www.rapidtables.com/convert/temperature/how-kelvin-to-fahrenheit.html
x is kelvi...