diff --git a/HW1/projectile.m b/HW1/projectile.m new file mode 100644 index 0000000..3fb0438 --- /dev/null +++ b/HW1/projectile.m @@ -0,0 +1,28 @@ +function h=projectile(v_mag,theta) +%input inital velocity v_mag +%input theta +angle=theta*(pi/180); %Converts the angle into radians +g=9.81; %acceleration due to gravity +x_position=2.37;%max x-position where the height will be calculated +hi=1.72; %height where the dart begins its projectile motion +vy=v_mag*sin(angle); %inital velocity in the y direction +vx=v_mag*cos(angle); %inital velocity in the x direction +t_air=x_position/vx; %The total flight time in seconds +y_d=(vy*t_air)-(.5*g*(t_air.^2)); %the y position not including the inital height +h=y_d+hi %Final height after including the inital height before thrown + + +%Pull function setdefaults +setdefaults +%plotting points +t= 0:.01:t_air; %range for the time from 0 to end of flight, space .01 +x=vx*t %calculating x position +y_d=(vy*t)-(.5*g*(t.^2));%y position without inital height +y=y_d+hi %calculating y position +%Ploting x and y points +plot(x,y) +%axis labels and title +xlabel('x position') +ylabel('y position') +title('Projectile Motion of Darts') +end diff --git a/HW1/setdefaults.m b/HW1/setdefaults.m new file mode 100644 index 0000000..8c3c5c8 --- /dev/null +++ b/HW1/setdefaults.m @@ -0,0 +1,3 @@ +set(0, 'defaultAxesFontSize', 16) +set(0,'defaultTextFontSize',14) +set(0,'defaultLineLineWidth',3) diff --git a/README.md b/README.md index 134beea..38fb974 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Computational Mechanics +# Computational Jokes ## ME 3255 Spring 2017 ### Github page: [https://github.uconn.edu/rcc02007/ME3255S2017.git] ### Public (ipynb rendering)[https://github.com/cooperrc/ME3255S2017] diff --git a/extra_credit_1/data.csv b/extra_credit_1/data.csv index 8e4a5ce..bc100f1 100644 --- a/extra_credit_1/data.csv +++ b/extra_credit_1/data.csv @@ -1,3 +1,6 @@ radius (cm), angle (degrees) -0, 0 -2.25, 62 +7.00, 96 +3.90, 186 +2.95, 166 +8.60, 262 +2.50, 355