Skip to content

update #2

Merged
merged 21 commits into from
Feb 7, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
format HW2
rcc02007 committed Jan 27, 2017
commit 76969854639064c294b27884a5a3911b5380447d
26 changes: 13 additions & 13 deletions HW2/README.md
Original file line number Diff line number Diff line change
@@ -5,26 +5,26 @@
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
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)
```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.*