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 LeadTin solder. The most common alloy available
commercially is Tin and Lead, although eutectic solder is available
In this and the following questions, prepare a function to classify the phase of a
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 Tin
Tin;
Temp:
LoSn polyfitQ;
TempLoSn Q Temperature on the LoSn Line at a given percent Tin.
set parameters for Mixture Liquid line when Tin
Tin;
Temp;
HiSn polyfitQ;
TempHiSn Q; Temperature on HiSn line at a given percent Tin
if Q Insert appropriate if statement here
PHASE 'Eutectic Point';
elseif Q Is it a solid?
Q Add appropriate code here
elseif PERCSN && Q Complete the logical question
PHASE 'Liquid';
elseif Q Appropriate logical question here
PHASE 'Liquid';
Q First of two statements to close out the If statement
Q Second of two statements to close out the if statement
end
fprintfQ Add appropriate code here
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
