Documente Academic
Documente Profesional
Documente Cultură
Assignment number:
Date:
QUESTION 1
Matrix A
15 -3 -1
a) -3 18 -6
-4 -1 12
Inverse Matrix a
0.072539 0.012781 0.012435
0.020725 0.060794 0.032124
0.025907 0.009326 0.090155
b)
Matrix B
4000
1500
2400
solution
c1= 339.171
c2= 251.1917
c3= 333.9896
ΔW3= Δc1
a13
ΔW3= 804.1667
Δc3= -15.285
QUESTION 2
clc
a)
A = [13.422 0 0 0;...
-13.422 12.252 0 0;...
0 -12.252 12.377 0;...
0 0 -12.377 11.797];
AI =
Columns 1 through 3
0.074504544777231 0 0
0.081619327456742 0.081619327456742 0
0.080795023026582 0.080795023026582 0.080795023026582
0.084767313723828 0.084767313723828 0.084767313723828
Column 4
0
0
0
0.084767313723828
conc =
1.0e+02 *
0.559156608553122
0.857411034933072
0.931162640381352
1.002373484784267
the matrix element relating to concentration of Havasu in the inverse matrix is found by indexing AI(4,1)
= 0.0848.
New_L_Havasu = 75;
Old_L_Havasu = conc(4,1);
Amount_reduced =
2.977249999999998e+02
The amount of loading to Lake Powell that must be reduced in order for the chloride
concentration of Lake Havasu to be 75 is 297.7250
c)
%c)
AN = normr(A);% normalize the matrix
AI = inv(AN);
column_sum = AI(1,1)+AI(2,1)+AI(3,1)+AI(4,1)
column_sum =
4.317672296988386
Absolute column sum of norm matrix above is 2. Find the condition number by multiplying this
by the column sum.
condition_number = 2 * column_sum
condition_number =
8.635344593976772
wrong_number = log10(condition_number)
wrong_number =
0.936279672798274
Question 3
clc
a) i)
A = [1 2 3;...
4 5 6;...
7 8 9];...
% ii)
condition = cond(A)
clear all
Inverse_A =
1.0e+16 *
condition =
3.813147060626918e+16
b) i)
A = [1 2 3;...
4 5 6;...
7 8 9.1];...
% ii)
condition = cond(A)
Inverse_A =
condition =
9.948786540216839e+02
In the first instance (a), an error message suggests that the matrix is ill-conditioned. When
element a33 is changed slightly, the matrix becomes well-conditioned.