This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 2 1 2 ˆ . C a a N a N = + + e) Use the MATLAB 'polyfit' function to find the coefficients 1 , a a in the least squares line and 1 2 , , a a a in the least squares quadratic. Compare your answers to the results obtained by solving the normal equations in Parts a) and d). f) Compute the average cost per wagon, i.e. ( ) ( ) / AC N C N N = and enter the results in the table. Use 'polyfit' to find the least squares quadratic 2 1 2 ˆ AC a a N a N = + + and the least squares cubic 2 3 1 2 3 ˆ . AC a a N a N a N = + + + Plot both and the data points on the same graph....
View Full Document
This note was uploaded on 06/09/2011 for the course EGM 4320 taught by Professor Klee during the Spring '11 term at University of Central Florida.
- Spring '11