Times 2 - START HERE
Try out this test problem first.
Given the variable x as your input, multiply it by two and put the result in y.
Examples:...
8ヶ月 前
解決済み
Find the Oldest Person in a Room
Given two input vectors:
* |name| - user last names
* |age| - corresponding age of the person
Return the name of the ol...
8ヶ月 前
解決済み
Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as
y = A.ⅇ^(-λt)*cos(2πft)
where A, λ, and f are scalars and t is a vector.
...
8ヶ月 前
解決済み
Calculate BMI
Given a matrix hw (height and weight) with two columns, calculate BMI using these formulas:
1 kilogram = 2.2 pounds
1 inch = 2...
8ヶ月 前
解決済み
Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...
8ヶ月 前
解決済み
Find the Best Hotels
Given three input variables:
hotels - a list of hotel names
ratings - their ratings in a city
cutoff - the rating at which yo...
8ヶ月 前
解決済み
Calculate Inner Product
Given two input matrices, x and y, check if their inner dimensions match.
If they match, create an output variable z which cont...
8ヶ月 前
解決済み
Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...
8ヶ月 前
解決済み
De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if
a =...
8ヶ月 前
解決済み
Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length).
For example:
x = [1 2 3 3 2 1] is s...
8ヶ月 前
解決済み
Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below.
Example
x = [2 3 6 9]
then y should be
[...
Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...