Median computation (★)
Given a vector of values, compute the median. The median is defined as the middle value in a set of *sorted* data. Thus, if
...
約1年 前
解決済み
Remove the row average (★★★)
(copy of Prob. 963)
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solut...
約1年 前
解決済み
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
...
約1年 前
解決済み
Swap the first and last columns (★★)
(copy of Prob 19)
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becom...
約1年 前
解決済み
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
<>
...
約1年 前
解決済み
Make a checkerboard matrix (★★★★★)
(copy of Prob. 4)
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1...
約1年 前
解決済み
Energy of a photon
⚛ ☢ ⚛ ☢ ⚛ ☢ ⚛
Given the frequency F of a photon in giga hertz.
Find energy E of this photon...
metre to feet converter
The idea is to make a converter, which exchange meters to feets.
We use a factor of 1m = 3.281*1f.
so 3m are equals to 9.843 m...