Lab 8 work - ME 218(17795 Alan Shu-Ming Kwok ME lab#8 x =.15 1.04 1.44 1.84 2.24 2.64 3.04 3.44 3.84 4.24 y = 7.5 5.6 4.4 3.6 3.0 2.5 2.2 1.9 1.5

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

ME 218 (17795) Alan Shu-Ming Kwok ME lab #8 x = [ .15 1.04 1.44 1.84 2.24 2.64 3.04 3.44 3.84 4.24 ]; y = [ 7.5 5.6 4.4 3.6 3.0 2.5 2.2 1.9 1.5 1.1]; Y = -2.*x + 8; plot(x,y, '.' ,x,Y); clear all ; x = [ .15 1.04 1.44 1.84 2.24 2.64 3.04 3.44 3.84 4.24 ]; y = [ 7.5 5.6 4.4 3.6 3.0 2.5 2.2 1.9 1.5 1.1]; f = -2.*x + 8;

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

View Full Document
ME 218 (17795) Alan Shu-Ming Kwok ME lab #8 plot(x,y, '.' ,x,f); e = sum((f-y).*(f-y)) e = 6.0736 clear all ; x = [ .15 1.04 1.44 1.84 2.24 2.64 3.04 3.44 3.84 4.24 ]; y = [ 7.5 5.6 4.4 3.6 3.0 2.5 2.2 1.9 1.5 1.1]; coefs = polyfit(x,y,1) f = coefs(1).*x + coefs(2); e = sum((f-y).*(f-y)) a = -1.4982 b = 6.9123 e = 2.1263 cl ear all ; x = [ .15 1.04 1.44 1.84 2.24 2.64 3.04 3.44 3.84 4.24 ]; y = [ 7.5 5.6 4.4 3.6 3.0 2.5 2.2 1.9 1.5 1.1]; yprime = log(y); plot(x,y, '.' ,x,yprime); coefs = polyfit(x,yprime,1)
Alan Shu-Ming Kwok ME lab #8 coefs = -0.4576 2.1388 clear all ; x = [ .15 1.04 1.44 1.84 2.24 2.64 3.04 3.44 3.84 4.24 ]; y = [ 7.5 5.6 4.4 3.6 3.0 2.5 2.2 1.9 1.5 1.1];

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.

This note was uploaded on 09/04/2011 for the course ME 218 taught by Professor Unknown during the Spring '08 term at University of Texas at Austin.

Page1 / 8

Lab 8 work - ME 218(17795 Alan Shu-Ming Kwok ME lab#8 x =.15 1.04 1.44 1.84 2.24 2.64 3.04 3.44 3.84 4.24 y = 7.5 5.6 4.4 3.6 3.0 2.5 2.2 1.9 1.5

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online