Description
Lab Assignment #2: Linear Algebra
Guideline: Submit to Camino a pdf report with answers to the following questions. Also submit all the source code needed to generate these answers as a separate zip file to Camino.
Note: matrix and vector operations can be found in lecture slides COEN140_02_LinearAlgebraReview.pdf.
1. Create a 2Γ5 matrix π with elements as random float numbers from 0 to 1. Print the rank of π.
Let π = πππ, find the shape and rank of π
Let π = πππ, find the shape and rank of π
2. Create a 3Γ5 matrix π with elements as random integers from 0 to 10, and find the dimension (shape) of π = πππ by coding;
Create a 3Γ1 column vector π° with elements as random integers from 0 to 10, and find the dimension of ππ° by coding;
Find the dimension of π°ππ by coding;
Find the dimension of π°πππ° by coding.
Find a way (by coding) to verify that πππ is symmetric.
Calculate πβ1. Print πβ1π and ππβ1.
3. Create a 5Γ1 column vector π± with elements as random float numbers from 0 to 1. Calculate π±π±π by coding. What do you think is the rank of π±π±π?
4. Create a 5Γ5 identity matrix π and print it.
Reviews
There are no reviews yet.