Professional Documents
Culture Documents
Fundamentals of Electric Circuits-5th-Edition
Fundamentals of Electric Circuits-5th-Edition
i) Create a matrix of 3 by 3 with all ones, then Create matrix of 8 by 1 with all
zeros, finally Create a matrix of 5 by 2 with all elements equal to 0.37.
ii) Create vector “s “containing elements of ‘x’ sorted in an ascending order.
Clear x from the workspace. From s create back a vector with the same
elements and in the same order as in x.
iii) Given the same matrix m = [1 2 3; 2 1 5; 4 6 4; 2 3 2], create matrix n with
rows sorted in a descending order of elements in the second column.
Lab Task 2:
i) Given matrix A = [0, 2, 1; 3, 1, 0; 4, 6, 4; 2, 0, 2], create a matrix with 1’s
at locations where a has zeros and 0’s elsewhere. Create a matrix
containing all 0’s except the maximum elements in each row of ‘A’.
ii) Make an n × n random matrix
a) calculates its inverse b) Multiply the two back together
c) calculates the residual (difference from the desired n × n identity
matrix eye(n))
iii) Given a vector x = [3, 1, 4] and integer number n = 5, create matrix y
containing n-times x(1) in 1st Row , n-times x(2) in 2nd Row and so
on….then covert this matrix into row vector V.
Lab Task 3:
Use matrix inverse, left &Right division to solve: i)
Comment on the result. Compare answer using “rref”
ii)
Lab Task 4:
Lab Task 4:
Use MATLAB Command to make partial fractions of following
4x 8
a) F ( x)
x^2 6 x 8
b) F ( x) x ^ 2 2 x 3
( x 1)^3
Lab Task 4
1)
2)
3)