Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places:
e.g. x = 2.3456 --> y = 2.346
5年以上 前
解決済み
Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector
for example
x ...
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 ...
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 + ...
07 - Common functions and indexing 6
Create a variable _m_ as a magic square with the size 6 x 6
Magic squares are defined as square matrices, where the sum of a...
5年以上 前
解決済み
07 - Common functions and indexing 3
Define _eMat_:
<<http://samle.dk/STTBDP/Assignment1_3e.png>>
Create the variable _eMat2_, which is equal to _eMat_ with th...
5年以上 前
解決済み
07 - Common functions and indexing 5
Create the vector _lin_:
<<http://samle.dk/STTBDP/Assignment1_7e.png>>
(the integers from 1 to 20)
Make every other val...
5年以上 前
解決済み
03 - Matrix Variables 5
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_3e.png>>
5年以上 前
解決済み
04 - Scalar Equations 3
Define the variables a, b, and c:
<<http://samle.dk/STTBDP/Assignment1_4-a.png>>
<<http://samle.dk/STTBDP/Assignment1_4-b....
5年以上 前
解決済み
05 - Vector Equations 3
Define the vector _dVec_:
<<http://samle.dk/STTBDP/Assignment1_2d.png>>
(Logarithmically spaced numbers between 1 and 10)
...
5年以上 前
解決済み
03 - Matrix Variables 3
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_3c.png>>
A 10x10 matrix where the numbers from 1 to 100 ...
5年以上 前
解決済み
02 - Vector Variables 4
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_2d.png>>
(Logarithmically spaced numbers between 1 and 1...
5年以上 前
解決済み
04 - Scalar Equations 2
Define the variables a and b:
<<http://samle.dk/STTBDP/Assignment1_4-a.png>>
<<http://samle.dk/STTBDP/Assignment1_4-b.png>...
5年以上 前
解決済み
07 - Common functions and indexing 4
Define the matrix _cMat_:
<<http://samle.dk/STTBDP/Assignment1_3c.png>>
( _cMat_ = 10x10 matrix where the numbers from 1 t...