{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Chapter 4 Matlab

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

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

( 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

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

View Full Document
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 1.2021 1.2728 1.3435 1.4142 >> y2=t*v*sin(theta)-(1/2)*g*t.^2 y2 = Columns 1 through 12 0 65.8107 121.8214 168.0320 204.4427 231.0534 247.8641 254.8747 252.0854 239.4961 217.1068 184.9175 Columns 13 through 21 142.9281 91.1388 29.5495 -41.8398 -123.0292 -214.0185 -314.8078 -425.3971 -545.7864 >> theta=pi/6 theta = 0.5236 >> x3=t*v*cos(theta) x3 = 1.0e+003 * Columns 1 through 12 0

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 ]}