Create a vector
Create a vector from 0 to n by intervals of 2.
6年以上 前
解決済み
Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1.
Hint: use increment.
6年以上 前
解決済み
Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...
6年以上 前
解決済み
Convert yards to feet
The goal of this script is to convert a value given in yards to feet.
7年以上 前
解決済み
Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...
03 - Matrix Variables 4
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_3d.png>>
A 3x4 NaN (Not a Number) matrix
(Hint: use ...
7年以上 前
解決済み
Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...
7年以上 前
解決済み
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...
Sum the rows
Sum the rows of the given matrix.
Example
x = [ 1 2
3 4 ]
y = [ 3
7 ]
約8年 前
解決済み
03 - Matrix Variables 6
Make _fMat_ be a 5x3 matrix of random integers with values from -3 to 3
(Hint: use *randi*)
約8年 前
解決済み
Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y.
A counting sequence is formed by "counting" the entrie...
約8年 前
解決済み
Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes.
---
If you want to get a random permutation of integer...
約8年 前
解決済み
Reverse a matrix
Its simple. You have to reverse a given matrix.
約8年 前
解決済み
Multiply a column by a row
* Given a column vector C and and a row vector R.
* Output a matrix M.
* Every column of M equals to C multiplied by correspon...
約8年 前
解決済み
The Deadly Sin
Melvyn and Banner are fighting over chocolates. Melvyn has X chocolates, while Banner has Y. Whoever has a lesser number of choc...
Extract leading non-zero digit
<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...