This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: title('Failure Time Plotted as a Function of Resistance for Overloaded Resistors') ylabel('Failure Time (minutes)') xlabel('Resistance (ohms)') % Determine the slope and intercept for the regression line coefficients = polyfit(resistance,failure_time,1); % Determine the predicted failure times (y values) using the original set % of resistances (x values) for the regression line. pred_failure_time = polyval(coefficients,resistance); % Add the regression line to the existing scatter plot hold on plot(resistance,pred_failure_time,'b') % Predict the failure time when the resistance is 42 ohms. predict_42ohms = polyval(coefficients,42); % Display the predicted and actual failure time for 42 ohms. disp('The predicted failure time (minutes) is:') disp(predict_42ohms) disp('The actual measured failure time (minutes) is:') disp(failure_time(15)) %----Comments----% The predicted failure time (minutes) is: 37.4472 % The actual measured failure time (minutes) is: 41 %...
View Full Document
This note was uploaded on 05/02/2011 for the course ENGR 132 taught by Professor Kutson during the Spring '11 term at Purdue University-West Lafayette.
- Spring '11