Chapter 4 Matlab

Chapter 4 Matlab - (Chapter 4 #2) plot(x,y) >...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
( Chapter 4 #2 ) plot(x,y) >> xlabel('horizontal distance') >> ylabel('vertical distance') >> title('X vs Y distance') (Chapter 4 #3 ) >> g=9.8 g = 9.8000 >> v=100 v = 100 >> t=0:20 t = Columns 1 through 20 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Column 21 20 >> theta=pi/2 theta = 1.5708 >> x=t*v*cos(theta) x = 1.0e-012 * Columns 1 through 12 0 0.0061 0.0122 0.0184 0.0245 0.0306 0.0367 0.0429 0.0490 0.0551 0.0612 0.0674 Columns 13 through 21 0.0735 0.0796 0.0857 0.0918 0.0980 0.1041 0.1102 0.1163 0.1225 >> y=t*v*sin(theta)-(1/2)*g*t.^2 y = Columns 1 through 12
Background image of page 1

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

View Full DocumentRight Arrow Icon
0 95.1000 180.4000 255.9000 321.6000 377.5000 423.6000 459.9000 486.4000 503.1000 510.0000 507.1000 Columns 13 through 21 494.4000 471.9000 439.6000 397.5000 345.6000 283.9000 212.4000 131.1000 40.0000 >> theta=pi/4 theta = 0.7854 >> x2=t*v*cos(theta) x2 = 1.0e+003 * Columns 1 through 12 0 0.0707 0.1414 0.2121 0.2828 0.3536 0.4243 0.4950 0.5657 0.6364 0.7071 0.7778 Columns 13 through 21 0.8485 0.9192 0.9899 1.0607 1.1314
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/19/2010 for the course MECH 310 taught by Professor Zhou during the Spring '10 term at Acadia.

Page1 / 5

Chapter 4 Matlab - (Chapter 4 #2) plot(x,y) >...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online