projectilec

projectilec - double x0 = 0 xf iangle v0 = 35.0...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 //projectile.c #include<stdio.h> #include<math.h> #include<chplot.h> #define M_G 9.80 #define NUM 100 double v0, theta0 double func(double x) { double y y = tan(theta0)*x -M_G*x*x/(2*v0*v0*cos(theta0)*cos(theta0)) return y } int main() {
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: double x0 = 0, xf, iangle v0 = 35.0 printf("Imput intital angle\n") scanf("%lf", &iangle) theta0 = iangle*M_PI/180 xf= v0*v0*sin(2*theta0)/M_G fplotxy(func, x0, xf, NUM, "A projectile", "x", "y") return 0 }...
View Full Document

This homework help was uploaded on 04/18/2008 for the course EME 5 taught by Professor Staff during the Fall '08 term at UC Davis.

Ask a homework question - tutors are online