From b7e934b8e2b85fb116ef15ee12ce3e183ace8b25 Mon Sep 17 00:00:00 2001 From: Patrick M Begley Date: Tue, 24 Jan 2017 09:52:05 -0500 Subject: [PATCH 1/7] Update data.csv --- extra_credit_1/data.csv | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/extra_credit_1/data.csv b/extra_credit_1/data.csv index 8e4a5ce..d1bb00a 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 +6.3, 39 +6.9, 60 +6.3, 100 +7.8, 249 +3.3, 282 From d692acfa61d8729a18a1dfdd2cb98bf0fb662f8c Mon Sep 17 00:00:00 2001 From: Patrick M Begley Date: Tue, 24 Jan 2017 09:53:29 -0500 Subject: [PATCH 2/7] Update data.csv --- extra_credit_1/data.csv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extra_credit_1/data.csv b/extra_credit_1/data.csv index d1bb00a..494ccc1 100644 --- a/extra_credit_1/data.csv +++ b/extra_credit_1/data.csv @@ -1,3 +1,5 @@ +this data can be found in the pull request for rcc02007/ME3255S2017 data.csv pull requests, and was added here during class + radius (cm), angle (degrees) 6.3, 39 6.9, 60 From a3da64789cef3fe49ff4909670b554e8925346ec Mon Sep 17 00:00:00 2001 From: Patrick M Begley Date: Thu, 26 Jan 2017 09:49:27 -0500 Subject: [PATCH 3/7] Create setdefaults.m --- HW1/setdefaults.m | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 HW1/setdefaults.m 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) From f6b83ce9cf2a45fdc49ccb2b0058b120543a7b82 Mon Sep 17 00:00:00 2001 From: Patrick Begley Date: Wed, 15 Feb 2017 20:27:54 -0500 Subject: [PATCH 4/7] testcommit just to test --- test.m | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.m diff --git a/test.m b/test.m new file mode 100644 index 0000000..5155298 --- /dev/null +++ b/test.m @@ -0,0 +1 @@ +blank \ No newline at end of file From eb2a7108be4473138c90182d09e8ad56a88bd861 Mon Sep 17 00:00:00 2001 From: Patrick Begley Date: Wed, 15 Feb 2017 21:07:59 -0500 Subject: [PATCH 5/7] update added projectile --- HW1/projectile.m | 28 ++++++++++++++++++++++++++++ HW1/projectile.m~ | 26 ++++++++++++++++++++++++++ test.m | 1 - 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 HW1/projectile.m create mode 100644 HW1/projectile.m~ delete mode 100644 test.m diff --git a/HW1/projectile.m b/HW1/projectile.m new file mode 100644 index 0000000..0d4ea20 --- /dev/null +++ b/HW1/projectile.m @@ -0,0 +1,28 @@ +function [h,t_linear,y] = projectile(v_mag,theta) +% Function that takes the initial velocity magnitude and the angle of +% launch of the projectile and calculates the height at 2.37m away from the +% initial position from an initial height of 1.72m. +% Inputs: v_mag, theta +% Output: h +% +% Also plots the path to a distance of 2.37m. + +i = 1; +x0 = 2.37; +y0 = 1.72; +g = -9.81; + +t = x0/(v_mag*cos(theta)); +t_linear = 0:0.01:t; +y = zeros(1,length(t_linear)); +h = y0 + x0/cos(theta) + 0.5*g*(x0/(v_mag*cos(theta)))^2; + +for t = t_linear + y(i) = y0 + v_mag*t + 0.5*g*t^2; + i = i + 1; +end + +plot(t_linear, y) + +end + diff --git a/HW1/projectile.m~ b/HW1/projectile.m~ new file mode 100644 index 0000000..bed113e --- /dev/null +++ b/HW1/projectile.m~ @@ -0,0 +1,26 @@ +function [h,t_linear,y] = projectile(v_mag,theta) +% Function that takes the initial velocity magnitude and the angle of +% launch of the projectile and calculates the height at 2.37m away from the +% initial position from an initial height of 1.72m. +% Inputs: v_mag, theta +% Output: h +% +% Also plots the path to a distance of 2.37m. + +x0 = 2.37; +y0 = 1.72; +g = -9.81; + +t = x0/(v_mag*cos(theta)); +t_linear = 0:0.1:t; +y = zeros(length(t_linear)); +h = y0 + x0/cos(theta) + 0.5*g*(x0/(v_mag*cos(theta)))^2; + +for t = t_linear + y() = y0 + v_mag*t + 0.5*g*t^2; +end + +plot(t_linear, y) + +end + diff --git a/test.m b/test.m deleted file mode 100644 index 5155298..0000000 --- a/test.m +++ /dev/null @@ -1 +0,0 @@ -blank \ No newline at end of file From 91bee5fdf88ec95c21e287ec6246946819c24d75 Mon Sep 17 00:00:00 2001 From: Patrick M Begley Date: Sat, 6 May 2017 16:00:22 -0400 Subject: [PATCH 6/7] create --- HW2/projectile.m | 1 + 1 file changed, 1 insertion(+) create mode 100644 HW2/projectile.m diff --git a/HW2/projectile.m b/HW2/projectile.m new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/HW2/projectile.m @@ -0,0 +1 @@ + From ab130bbda5b1ad2851a7f0eebc87e98ae8fb394a Mon Sep 17 00:00:00 2001 From: Patrick M Begley Date: Sat, 6 May 2017 16:01:53 -0400 Subject: [PATCH 7/7] Update projectile.m --- HW2/projectile.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/HW2/projectile.m b/HW2/projectile.m index 8b13789..22bd31d 100644 --- a/HW2/projectile.m +++ b/HW2/projectile.m @@ -1 +1,6 @@ +function h = projectile(v_mag, theta) +% Takes an input velocity magnitude and angle and outputs the height of the projectile 2.37 m away from the initial position. +h = 1.72 + 2.37 * sin(theta)/cos(theta) + 1/2*(-9.81)*(2.37/v_mag/cos(theta))^2; + +end