Vector raised to a power, element-wise (★)
Given a vector A and a number x, raise each element of the vector to the power of x. Thus, if A = [2 5 7 1] and x = 0.5, then
...
6年弱 前
解決済み
Vector of digits (★★)
Given a positive integer x, construct a vector y with all the digits of x in the order of appearance in x. Thus, if
x = 172...
Number of Circles in a Number
Given a number, return the number of closed 'circles' in the base 10 numerical representation.
Note: the number 4 has no circ...
6年弱 前
解決済み
Compute the perimeter of an ellipse
While the area of an ellipse is straightforward to compute, the perimeter (or circumference) is more complicated. The perimeter ...
Reverse a matrix
Its simple. You have to reverse a given matrix.
6年弱 前
解決済み
Divisors of an integer
Given a number N, return a vector V of all integers that divide N.
For example,
N = 10
Then
V=[1 2 5 10]
6年弱 前
解決済み
Moving average (variable kernel length)
Find the moving average in a vector. The kernel length is a variable.
For example
x = 1:10
kernel_length = 2
would r...
Divide by 4
Given the variable x as your input, divide it by 4 and put the result in y.
6年弱 前
解決済み
Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.
6年弱 前
解決済み
Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.
6年弱 前
解決済み
What number has this problem?
This problem is added because it is problem number *???* in the "Community" problems section.
<http://www.mathworks.de/matlab...
6年弱 前
解決済み
Identify the heavier bag
There are N=2^n bags of rice looking alike, N-1 of which have equal weight and one is slightly heavier. The weighing balance is ...
construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x.
E...