From af7ae19feb7508e526665d28312674df16674d9b Mon Sep 17 00:00:00 2001 From: "Ryan C. Cooper" Date: Fri, 27 Jan 2017 17:24:51 -0500 Subject: [PATCH 1/3] added HW 2 --- HW2/README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 HW2/README.md diff --git a/HW2/README.md b/HW2/README.md new file mode 100644 index 0000000..f3d0952 --- /dev/null +++ b/HW2/README.md @@ -0,0 +1,30 @@ +# Homework #2 +## due 2/3/17 + +1. Now that you have created your own repository, 'homework_1', that has a README.md file. +Create a new file in this repository called `setdefaults.m`. This file is a matlab/octave +script that will set default plotting parameters. In this file, add the following lines: + +```matlab +set(0, 'defaultAxesFontSize', 16) +set(0,'defaultTextFontSize',14) +set(0,'defaultLineLineWidth',3) +``` + +Commit the changes to your repository. + +2. Clone your 'homework_1' repository to your own computer. Create a function, +`projectile.m` that will calculate the location of an object with an initial velocity. The +function inputs are v_mag (initial speed), theta (initial angle). The output is the height +of the object 2.37 m from its starting position. Assume g=9.81 m/s^2 and its initial +height is 1.72 m. + +```matlab +>> h=projectile(v_mag,theta) + + h= 1 +``` + +In addition to the output of `h`-height at 2.37 m-plot the path of the object from its +initial position its position at 2.37 m away from the start. *Note: use your +`setdefaults.m` to set the plot defaults before outputting the result.* From 76969854639064c294b27884a5a3911b5380447d Mon Sep 17 00:00:00 2001 From: "Ryan C. Cooper" Date: Fri, 27 Jan 2017 17:26:55 -0500 Subject: [PATCH 2/3] format HW2 --- HW2/README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/HW2/README.md b/HW2/README.md index f3d0952..6255141 100644 --- a/HW2/README.md +++ b/HW2/README.md @@ -5,13 +5,13 @@ Create a new file in this repository called `setdefaults.m`. This file is a matlab/octave script that will set default plotting parameters. In this file, add the following lines: -```matlab -set(0, 'defaultAxesFontSize', 16) -set(0,'defaultTextFontSize',14) -set(0,'defaultLineLineWidth',3) -``` + ```matlab + set(0, 'defaultAxesFontSize', 16) + set(0,'defaultTextFontSize',14) + set(0,'defaultLineLineWidth',3) + ``` -Commit the changes to your repository. + Commit the changes to your repository. 2. Clone your 'homework_1' repository to your own computer. Create a function, `projectile.m` that will calculate the location of an object with an initial velocity. The @@ -19,12 +19,12 @@ function inputs are v_mag (initial speed), theta (initial angle). The output is of the object 2.37 m from its starting position. Assume g=9.81 m/s^2 and its initial height is 1.72 m. -```matlab ->> h=projectile(v_mag,theta) + ```matlab + >> h=projectile(v_mag,theta) - h= 1 -``` + h= 1 + ``` -In addition to the output of `h`-height at 2.37 m-plot the path of the object from its -initial position its position at 2.37 m away from the start. *Note: use your -`setdefaults.m` to set the plot defaults before outputting the result.* + In addition to the output of `h`-height at 2.37 m-plot the path of the object from its + initial position its position at 2.37 m away from the start. *Note: use your + `setdefaults.m` to set the plot defaults before outputting the result.* From 7f933800b2280fe5f495baa509403b651e94a94b Mon Sep 17 00:00:00 2001 From: Ryan C Cooper Date: Fri, 27 Jan 2017 17:28:16 -0500 Subject: [PATCH 3/3] fix typo in HW2 --- HW2/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HW2/README.md b/HW2/README.md index 6255141..b182619 100644 --- a/HW2/README.md +++ b/HW2/README.md @@ -26,5 +26,5 @@ height is 1.72 m. ``` In addition to the output of `h`-height at 2.37 m-plot the path of the object from its - initial position its position at 2.37 m away from the start. *Note: use your + initial position to its position at 2.37 m away from the start. *Note: use your `setdefaults.m` to set the plot defaults before outputting the result.*