Question: The graph shows a phase diagram for Lead - Tin solder. The most common alloy available commercially is 6 0 % Tin and 4 0

The graph shows a phase diagram for Lead-Tin solder. The most common alloy available
commercially is 60% Tin and 40% Lead, although eutectic solder is available (63%Sn,37%
Pb. In this and the following questions, prepare a function to classify the phase of a Sn-Pb
solder and should accept two inputs: TEMP, Temperature in degrees C, and PERCSN, Percent
Tin. The function should return a text string that identifies one of four possible phases:
Liquid, Solid, Mixture, Eutectic Point. If a combination of inputs results in an outcome falling
directly on a line, the classification should be to the region below (lower temperature). The
equation to define the lines must be done using Polyfit. Finally, the program shoudl produce
a formatted output statement in the command window similar to," For XX% Tin at YY
Degrees Celsius, the phase is PHASE,", where XX, YY, and PHASE are replaced by actual
values from the code. The partial code below is designed to implement the function. You are
to fill in the missing code to make the function work.Q: ,% Declaration of function and passed parameters.
% set parameters for Mixture / Liquid line when Tin63%
Tin1=[Q2];
Temp1=[Q3]:
LoSn = polyfit(Q4);
TempLoSn = Q5% Temperature on the LoSn Line at a given percent Tin.
% set parameters for Mixture / Liquid line when Tin >63%
Tin2=[Q6];
Temp2=[Q7];
HiSn = polyfit(Q8);
TempHiSn = Q9; % Temperature on HiSn line at a given percent Tin
if Q10% Insert appropriate if statement here
PHASE = 'Eutectic Point';
elseif Q11% Is it a solid?
Q12% Add appropriate code here
elseif PERCSN 63&& Q13% Complete the logical question
PHASE = 'Liquid';
elseif Q14% Appropriate logical question here
PHASE = 'Liquid';
Q15% First of two statements to close out the "If" statement
Q16% Second of two statements to close out the "if" statement
end
fprintf(Q17)% Add appropriate code here
The graph shows a phase diagram for Lead - Tin

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!