Contents
Aaron Klapheck
clear, clc
date
ans =
26-Sep-2007
Problem 20
A = 1600
R = [0: 0.01: 100];
L = (2*A - pi*R.^2)./(4*R);
Cost = 2*(L+R)*30 + pi*R*40;
[Min_Cost, Index] = min(Cost)
R = R(Index)
L = L(Index)
A =
1600
Warning: Divide by zero.
Min_Cost =
5.1575e+003
Index =
1862
R =
18.6100
L =
28.3714
Problem 21a
x = 0.63
Converg = 1/(1-x)
Exponants = [0:1:11]
Power_Series = x.^Exponants
Sum = sum(Power_Series)
Compair = Converg - Sum
Exponants = [0:1:51]
Power_Series = x.^Exponants
Sum = sum(Power_Series)
Compair = Converg - Sum
Exponants = [0:1:101]
Power_Series = x.^Exponants
Sum = sum(Power_Series)
Compair = Converg - Sum
x =
0.6300
Converg =
2.7027
Exponants =
0 1 2 3 4 5 6 7 8 9 10 11
Power_Series =
Columns 1 through 9
1.0000 0.6300 0.3969 0.2500 0.1575 0.0992 0.0625 0.0394 0.0248
Columns 10 through 12
0.0156 0.0098 0.0062
Sum =
2.6921
Compair =
0.0106
Exponants =
Columns 1 through 16
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Columns 17 through 32
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Columns 33 through 48
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
Columns 49 through 52
48 49 50 51
Power_Series =
Columns 1 through 9
1.0000 0.6300 0.3969 0.2500 0.1575 0.0992 0.0625 0.0394 0.0248
Columns 10 through 18
0.0156 0.0098 0.0062 0.0039 0.0025 0.0016 0.0010 0.0006 0.0004
Columns 19 through 27
0.0002 0.0002 0.0001 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000
Columns 28 through 36
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Columns 37 through 45
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Columns 46 through 52
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Sum =
2.7027
Compair =
9.9428e-011
Exponants =
Columns 1 through 16
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Columns 17 through 32
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Columns 33 through 48
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
Columns 49 through 64
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
Columns 65 through 80
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
Columns 81 through 96
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
Columns 97 through 102
96 97 98 99 100 101
Power_Series =
Columns 1 through 9
1.0000 0.6300 0.3969 0.2500 0.1575 0.0992 0.0625 0.0394 0.0248
Columns 10 through 18
0.0156 0.0098 0.0062 0.0039 0.0025 0.0016 0.0010 0.0006 0.0004
Columns 19 through 27
0.0002 0.0002 0.0001 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000
Columns 28 through 36
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Columns 37 through 45
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Columns 46 through 54
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Columns 55 through 63
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Columns 64 through 72
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Columns 73 through 81
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Columns 82 through 90
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Columns 91 through 99
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Columns 100 through 102
0.0000 0.0000 0.0000
Sum =
2.7027
Compair =
8.8818e-016
Problem 24
R_s = [10:5:25]
R_l = [10:5:30]
[R_s_matrix, R_l_matrix] = meshgrid(R_s, R_l)
x = R_l_matrix./(R_s_matrix+R_l_matrix).^2
[value, index] = max(x)
matrix_answer = [R_s; R_l(index)]
R_s =
10 15 20 25
R_l =
10 15 20 25 30
R_s_matrix =
10 15 20 25
10 15 20 25
10 15 20 25
10 15 20 25
10 15 20 25
R_l_matrix =
10 10 10 10
15 15 15 15
20 20 20 20
25 25 25 25
30 30 30 30
x =
0.0250 0.0160 0.0111 0.0082
0.0240 0.0167 0.0122 0.0094
0.0222 0.0163 0.0125 0.0099
0.0204 0.0156 0.0123 0.0100
0.0187 0.0148 0.0120 0.0099
value =
0.0250 0.0167 0.0125 0.0100
index =
1 2 3 4
matrix_answer =
10 15 20 25
10 15 20 25
Problem 27
A = [11, 5; -9, -4]
B = [-7, -8; 6, 2]
Products_AB = A*B
Products_BA = B*A
A =
11 5
-9 -4
B =
-7 -8
6 2
Products_AB =
-47 -78
39 64
Products_BA =
-5 -3
48 22
Problem 29
Unit_Production_Cost = [7, 3, 2; 3, 1, 3; ...
9, 4, 5; 2, 5, 4; 6, 2, 1]
Quarterly_Production_Volume = [16, 14, 10, 12; 12, 15, 11, 13; ...
8, 9, 7, 11; 14, 13, 15, 17; 13, 16, 12, 18]
Quarterly_Costs = Unit_Production_Cost'*Quarterly_Production_Volume
Total_Cost_By_Quarter = sum(Quarterly_Costs)
Total_Cost = sum(Total_Cost_By_Quarter)
Unit_Production_Cost =
7 3 2
3 1 3
9 4 5
2 5 4
6 2 1
Quarterly_Production_Volume =
16 14 10 12
12 15 11 13
8 9 7 11
14 13 15 17
13 16 12 18
Quarterly_Costs =
326 346 268 364
188 190 168 214
177 186 160 204
Total_Cost_By_Quarter =
691 722 596 782
Total_Cost =
2791