Double colon operator: Increment by x
* Construct a row array countValues from 0 to 25, elements incremented by incrementValue.
Ex: If incrementValue is 5, countVa...
10年弱 前
解決済み
Add two numbers
Calculate the sum of two numbers.
Example
input = [2 3]
output = 5
Matlab Basics II - Velocity of a particle
A particle is moving in space, such that it's velocity is given by:
<<http://s30.postimg.org/5rf1xtvj5/cody1.png>>
write a...
10年弱 前
解決済み
Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix
example:
A = [1 2 3]
output = [1 4 9]
10年弱 前
解決済み
Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts
example:
a = 1, b = 2
output = 1 1.25 ...
10年弱 前
解決済み
Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not.
eg. x = 1884
output = 1
eg. x = 3
output = 0
10年弱 前
解決済み
Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...
Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x
example: x = [1 2 3; 4 5 6];
output [1;4];
10年弱 前
解決済み
Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by:
x = 1/2 gt^2
write a function that calculat...
Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer:
e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2
10年弱 前
解決済み
ASCii Code
Using matlab, give the symbol that is associated with ASCii code 122
10年弱 前
解決済み
Matlab Basics - Sum a vector
Write a script to add up all the elements in a vector
e.g. x = [1 2 3 4] --> output = 10
10年弱 前
解決済み
Counting down
Create a vector that counts from 450 to 200 in increments of 10.
10年弱 前
解決済み
Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix
Grades=[98 56 34 100 88 87]
**re...