07 - Common functions and indexing 2
Define _eMat_:
<<http://samle.dk/STTBDP/Assignment1_3e.png>>
Calculate eMean as the mean across the rows of _eMat_. The an...
6年弱 前
解決済み
02 - Vector Variables 3
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_2c.png>>
(all the numbers from 5 to -5 in increments of ...
6年弱 前
解決済み
03 - Matrix Variables 4
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_3d.png>>
A 3x4 NaN (Not a Number) matrix
(Hint: use ...
6年弱 前
解決済み
03 - Matrix Variables 6
Make _fMat_ be a 5x3 matrix of random integers with values from -3 to 3
(Hint: use *randi*)
6年弱 前
解決済み
06 - Matrix Equations 3
Define the matrices _aMat_, _bMat_, and _cMat_:
<<http://samle.dk/STTBDP/Assignment1_3a.png>>
( _aMat_ = 9x9 matrix full o...
6年弱 前
解決済み
05 - Vector Equations 1
Define the vector _cVec_:
<<http://samle.dk/STTBDP/Assignment1_2c.png>>
(all the numbers from 5 to -5 in increments of -0....
6年弱 前
解決済み
03 - Matrix Variables 1
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_3a.png>>
A 9x9 matrix full of 2's
(Hint: use *ones* o...
6年弱 前
解決済み
03 - Matrix Variables 2
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_3b.png>>
A 9x9 matrix of zeros, but with the following v...
6年弱 前
解決済み
02 - Vector Variables 2
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_2b.png>>
6年弱 前
解決済み
Find the logic
There exists one logic in between input and output. Find it (easy math).
Example 1:
x=13 then y=339;
Example 2:
x=26...
6年弱 前
解決済み
0<=x<=pi?
Check whether the given angle is between zero and pi.
Return logical true or false.
6年弱 前
解決済み
Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next.
Example input:
x = [10 2];
6年弱 前
解決済み
Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN;
output -> matrix(p*m), the same matrix where we deleted the enti...
6年弱 前
解決済み
How many Integers?
Count the integers in a given vector |v|.
You *must* use a loop to count each element separately.
Examples:
Input: v...
6年弱 前
解決済み
Eye Squared
For a positive integer |n| create the identity matrix with |n| elements.
In case it is not possible to produce an identity ma...
6年弱 前
解決済み
Count me in
Count the number of occurrences of the second input in the first input
Ex.
x1 = 12344455511; x2 =2; output = 1
...
multiple of nine?
Given a positive number n, return true if n is a multiple of 9 and false if not. Do not make the division and do not use functio...
6年弱 前
解決済み
construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x.
E...
6年弱 前
解決済み
Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?;
x = [1 : 0.5 : 6];
y ...
6年弱 前
解決済み
Find the mean of two vectors
Take two vectors, and output the mean of them (bonus if you don't use the in-built mean function)
Simple String Concatenation
This is a simple problem involving taking two incoming strings, and outputting the concatenated string with a space separating t...