Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
9 years ago
Solved
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
9 years ago
Solved
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:...
9 years ago
Solved
only input
Return the output without writing any code into the function.
9 years ago
Solved
Add 7
Given an input variable x, output a variable y that is 7 greater than x.
Example:
Input x = 1
Output y is 8
Input ...
9 years ago
Solved
Divide by 4
Given the variable x as your input, divide it by four and put the result in y.
9 years ago
Solved
Y=X
Given an input variable x, output a variable y that is equal in value to x.
Example:
Input x = 1
Output y is 1
Inp...
9 years ago
Solved
Beginner's Problem - Squaring
Try out this test problem first.
Given the variable x as your input, square it by two and put the result in y.
Examples:
...
9 years ago
Solved
multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y.
Examples:
Input x = 2
Output y is ...
9 years ago
Solved
Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.
9 years ago
Solved
Convert yards to feet
The goal of this script is to convert a value given in yards to feet.