Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1 2 Question 1) Aluminum alloys are made by adding other elements to aluminum to

ID: 3666101 • Letter: 1

Question

1 2 Question 1) Aluminum alloys are made by adding other elements to aluminum to improve its properties, such as hardness or tensile strength. The following table shows the composition of five commonly used alloys, which are known by their alloy numbers (2024, 6061, and so on). Composition of aluminum alloys 1 2024 4.4 3102 0.1 6061 0 7005 0 7075 1.6 2.5 0 70 1.5 0.6 0.1 0 0.20.403 60611 0 0.6 0 0 4.5 The cost of each element per unit is shown in the following table: Material cost of each element per ton (S 10 3) Al Cu Mg 2.0 7.1 2.65 4.5 3.2 2.1 Mn Si Zn The manufacture cost for each type of aluminum alloy also includes costs of labour and transportation, in addition to the material cost, as shown in the following table: Unit product costs (S 10*3 per ton) Material Labour Transportation Allo 2024 Calculated based on above tables3 3102 Calculated based on above tables 2 6061 Calculated based on above tables 7005 Calculated based on above tables4 7075 Calculated based on above tables S

Explanation / Answer

%Program:


ones(4,3)%commonly used alloys and composition of metals
alloys=[2024 4.4 1.5 0.6 0 0;3102 0.1 0 0.2 0.4 0.3;6061 0 1 0 0.6 0; 7005 0 1.4 0 0 4.5; 7075 1.6 2.5 0 7 0];
% material cost od each element per ton
% (5*10^3) Al cu mg mn si zn
materialCost=[2.0 7.1 2.65 4.5 3.2 2.1];
% manufacturing cost labour and transportation
unitProductCost=[2024 3 2; 3102 2 3; 6061 1 3;7005 4 5;7075 5 4];
quaterlyProdVol=[2024 16 14 10 12; 3102 13 16 12 19;6061 12 15 11 13; 7005 8 9 7 11;7075 14 13 15 17];
alloyCode=input('Enter an alloy code');
print('COST ANALYSIS: Alloy %d',alloyCode);
print('**********************************');

[r, c] = size(alloys);
total=0;
for i=1:r
if(alloys(i,1)==alloyCode)
for j=2:c
total=total+(alloys(i,j)*materialCost(j));
end
end
end
print('Material cost/ton: $%f',total);
for i=1:r
if(alloys(i,1)==alloyCode)
   print('Al (--%): $',alloys(i,2)*materialCost(2));
   print('cu (--%): $',alloys(i,3)*materialCost(3));
   print('Mg (--%): $',alloys(i,4)*materialCost(4));
   print('Mn (--%): $',alloys(i,5)*materialCost(5));
   print('Si (--%): $',alloys(i,6)*materialCost(6));
   print('Zn (--%): $',alloys(i,7)*materialCost(7));
end
end
[r, c] = size(unitProdCost);
for i=1:r
if(quaterlyProdVol(i,1)==alloyCode)
print('Labour cost/ton: $',quaterlyProdVol(i,2));
print('Transportation cost/ton: $',quaterlyProdVol(i,3));
end
end
%matrix_max - the maximum value of the matrix
[rows, columns] = size(quaterlyProdVol);
print('Quaterly cost (in $*10^3):');
for i=1:rows
if(quaterlyProdVol(i,1)==alloyCode)
   print('Q1: $%f',quaterlyProdVol(i,2));
   print('Q2: $%f',quaterlyProdVol(i,3));
   print('Q3: $%f',quaterlyProdVol(i,4));
   print('Q4: $%f',quaterlyProdVol(i,5));
end
end
%to calculate annual cost
annual=0;
for i=1:rows
if(quaterlyProdVol(i,1)==alloyCode)
for j=2:columns
annual=annaul+quaterlyProdVol(i,j);
end
end
end
print('Annual Cost (in $*10^3): $%f',annual);