Académique Documents
Professionnel Documents
Culture Documents
lecture 6
Olawale B. Akinwale
Dept of Electronic & Electrical
Engineering
Obafemi Awolowo University, Ile-Ife
Solving Equations
3 x1 2 x2 5 x3 10
x1 x2 x3 1
7 x1 5 x2 0.5 x3 2.5
Can also be written as
3 2 5 x1 10
1 1 1 x2 1
7 5 0.5 x 2.5
3
Solving Equations (cont’d)
• Solve:
3x1 2 x2 3 x3 10
3 x1 2 x2 3 x3 10
7 x1 5 x2 0.5 x3 2.5
Solving Equations (cont’d)
• Solve:
3x1 2 x2 3 x3 10
3 x1 2 x2 3 x3 10
7 x1 5 x2 0.5 x3 2.5
Answer:
??
Solving Equations (cont’d)
• c = ones(4,3)
• d = zeros(20,1)
• I = eye(5)
• D = diag( [2 1 0 -1 -2] )
• L = diag( [1 2 3 4], -1 )
• R = randn(5,5) % R is a 5 x 5 matrix
% of random numbers.