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...
6年弱 前
解決済み
Sum of elements of a vector (★★★)
Given any vector x = [x1, x2, x3, ... xn], compute the sum of its elements.
Thus, if x = [ 1 3 -2 5 ], then the sum of its el...
6年弱 前
解決済み
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
<>
...
6年弱 前
解決済み
Zero Cross
Write a function that counts the number of times n a signal x changes sign.
Examples
x = [1 2 -3 -4 5 6 -7 8 -9 10 11]
...
6年弱 前
解決済み
Column Removal (★★★)
(copy of prob 7)
Remove the nth column from input matrix A and return the resulting matrix in output B.
So if
A = [1 2...
6年弱 前
解決済み
Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n.
Example
For n = 2
then sum of squares = 5 (1^2 + ...
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...
6年弱 前
解決済み
Reverse the Words (not letters) of a String
*Description*
Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...
6年弱 前
解決済み
Given A4 sizes find A3's long side
I think you know the relation between A3 and A4 paper so givens are sides of A4
x1=long side of A4
y1=short side of A4
y2 is ...
6年弱 前
解決済み
Bit to Gigabyte
1 bit =
1.25 × 10^-10 gigabytes | x is bit | y is gigabyte
find the 'M'
for an input x, return 1 at the location of the letter 'M'
6年弱 前
解決済み
true or false
if the matrix has a zero, return true. else, return false
6年弱 前
解決済み
Sum the rows
Sum the rows of the given matrix.
Example
x = [ 1 2
3 4 ]
y = [ 3
7 ]
6年弱 前
解決済み
Where is the number that you want to find?
For a given matrix A, find where the input number x appears.
Do this task by returning the vector which contains the row and th...