This preview shows pages 1–2. Sign up to view the full content.

function [] = phases_yourlogin(PctB,temp) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Programmer(s) and Purdue Email Address(es): % 1. Dr. Matthew Ohland (ohland@purdue.edu) % 2. adapted from an earlier solution by Chell Nyquist % % Section #: ALL % % Assignment #: Homework 4, Problem 5 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Finds the phases present in a binary system given % the mass percent of compound B and the temperature. % % INPUT ARGUMENTS: % PctB mass % of compound B % temp temperature of mixture % OUTPUT ARGUMENTS: % phase_string text phrase describing phases present %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % INPUTS % Validate inputs if nargin ~= 2 fprintf('Two inputs are needed.\n') elseif PctB < 0 | PctB > 100 fprintf('Mass percent of B must be between 0 and 100.\n') else % program continues if no input violations have occurred %---- Input Section ---- meltA = 630;

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.