{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lab 8 work

# lab 8 work - ME 218(17795 Alan Shu-Ming Kwok ME lab#8 x...

This preview shows pages 1–8. 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)
ME 218 (17795) 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]; yprime = log(y); coefs = polyfit(x,yprime,1); b = coefs(1) a = exp(coefs(2)) f = a.*exp(b.*x); plot(x,y, '.' ,x,f);

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 xlabel( 'Position' ); ylabel( 'Amplitude' ); g = a*exp(b*6) g = 0.5450 = vt 20t = = / / xt 20t 20t3 23 2 X(16) = 853.3333

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

View Full Document

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.

{[ snackBarMessage ]}