forked from rcc02007/ME3255F2017
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
added HW1 and extra credit 1
- Loading branch information
Showing
24 changed files
with
964 additions
and
129 deletions.
There are no files selected for viewing
593 changes: 485 additions & 108 deletions
593
03_Intro to matlab-octave/.ipynb_checkpoints/lecture_03-checkpoint.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<meta http-equiv="Content-Style-Type" content="text/css" /> | ||
<meta name="generator" content="pandoc" /> | ||
<title></title> | ||
<style type="text/css">code{white-space: pre;}</style> | ||
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script> | ||
</head> | ||
<body> | ||
<h1 id="homework-1">Homework #1</h1> | ||
<h2 id="due-12417">due 1/24/17</h2> | ||
<ol style="list-style-type: decimal"> | ||
<li><p>The first assignment is to fork the course syllabus and assignment.</p> | ||
<ol style="list-style-type: lower-alpha"> | ||
<li>Sign into your UConn github account via <a href="https://github.uconn.edu/">github.uconn.edu</a>.</li> | ||
</ol></li> | ||
</ol> | ||
<div class="figure"> | ||
<img src="g1.jpg" alt="Step 1" /> | ||
<p class="caption">Step 1</p> | ||
</div> | ||
<div class="figure"> | ||
<img src="g2.jpg" alt="Step 2" /> | ||
<p class="caption">Step 2</p> | ||
</div> | ||
<pre><code>b. Go to | ||
[https://github.uconn.edu/rcc02007/ME3255S2017.git](https://github.uconn.edu/rcc02007/ME3255S2017.git) | ||
and watch the repository. | ||
|
||
c. Fork the repository to create your own version of the syllabus and assignments. </code></pre> | ||
<ol start="2" style="list-style-type: decimal"> | ||
<li><p>The next assignment is to create your own repository named ‘01_ME3255_repo’.</p> | ||
<ol style="list-style-type: lower-alpha"> | ||
<li><p>(if you signed out) Sign into your UConn github account via <a href="https://github.uconn.edu/">github.uconn.edu</a>.</p></li> | ||
<li><p>Follow these steps to create your own repository named <code>01_ME3255_repo</code>:</p> | ||
<ol style="list-style-type: lower-roman"> | ||
<li>Click the +-sign and choose ‘New repository’</li> | ||
</ol></li> | ||
</ol></li> | ||
</ol> | ||
<p><img src="g3.jpg" alt="Step 3" /><br /> | ||
ii. In the ‘Repository name’ enter ‘01_ME3255_repo’. Add a description. Make it private. Then check the box ‘Initialize this repository with a README’.</p> | ||
<p><img src="g4.jpg" alt="Step 4" /><br /> | ||
iii. Now you are in your repo. Click on the README.md file and then click the pencil to edit it.</p> | ||
<p><img src="g5.jpg" alt="Step 5" /><br /> | ||
iv. Add a header with a <code>#</code> and type <code># Answer to Homework Question</code>. Under this line answer this question: What do you hope to learn this semester?</p> | ||
<p><img src="g6.jpg" alt="Step 6" /><br /> | ||
v. At bottom of page, click ‘Commit changes’.</p> | ||
<p><img src="g7.jpg" alt="Step 7" /><br /> | ||
vi. Verify that your README.md file has been updated. Then copy the HTTPS clone URL on the right of the page.</p> | ||
<p><img src="g8.jpg" alt="Step 8" /><br /> | ||
vii. Paste this into the Homework #1 Google form reponse. <a href="https://goo.gl/forms/b3YrBuFxZaXTYV5s1" class="uri">https://goo.gl/forms/b3YrBuFxZaXTYV5s1</a></p> | ||
<p><img src="g9.jpg" alt="Step 9" /><br /> | ||
viii. Click on the gear for “Settings” then “Collaborators” on the left menu. Add <code>rcc02007</code> (Ryan C. Cooper) and <code>zhs15101</code> (Zhiqiang Shen) as a collaborators.</p> | ||
<ol start="3" style="list-style-type: decimal"> | ||
<li><p>Use a script to create a variable called <code>A_66</code>, where every row, column is the product of the two indices from 1 to 6 e.g. A_66(3,2)=6 and A_66(4,4)=16. Calculate the mean and standard deviation of the values in A_66.</p></li> | ||
<li><p>Copy the data in <a href="https://github.uconn.edu/rcc02007/ME3255F2017/blob/master/03_Intro%20to%20matlab-octave/US_energy_by_sector.csv">US_energy_by_sector.csv</a> to a file in you working directory in Matlab/Octave.</p> | ||
<ol style="list-style-type: lower-alpha"> | ||
<li><p>Plot the US energy consumption from 1949 to 2016 for “Total Energy Consumed by the Residential Sector” and “Total Energy Consumed by the Transportation Sector” in trillions of Btu’s.</p></li> | ||
<li><p>Plot the cumulative US energy consumption from 1949 to 2016 for “Total Energy Consumed by the Residential Sector” and “Total Energy Consumed by the Transportation Sector” in quintillions of Btu’s (1 quintillion = 10<span class="math inline">\(^6\)</span> trillion). The cumulative energy is the area under the curve in part a from 1949 to a given year.</p></li> | ||
</ol></li> | ||
<li><p>In this part, you will modify the function presented in lecture <code>freefall.m</code>. In lecture, the function required an input of <code>N</code> to divide the 12 second solution into N-steps. Here, modify the input so that you can specify two inputs, step size-<code>h</code>, and timespan-<code>timespan</code>.</p> | ||
<ol style="list-style-type: lower-alpha"> | ||
<li><p>Plot a comparison between calculated velocities v(t) for timesteps of h=0.1, 1, and 5 sec from 0 to 30 seconds.</p></li> | ||
<li><p>Save the script that created the comparison plot as ‘freefall_comparison.m’ and the figure as figure01.png (use command <code>> print(figure01.png)</code>)</p></li> | ||
<li><p>Save your work to a folder called ‘problem_3’ and add it to the ‘01_ME3255_repo’ repository</p></li> | ||
</ol></li> | ||
<li><p>In this part we will create functions that calculate velocity and acceleration in 3D based upon x,y,z-coordinates and time.</p> | ||
<ol style="list-style-type: lower-alpha"> | ||
<li><p>Create a function that takes four vectors as input, x,y,z,t,(where x,y,z are coordinate positions in meters) and its output are three vectors [vx,vy,vz] which are velocity components in m/s.</p></li> | ||
<li><p>Create a function that takes four vectors as input, x,y,z,t,(where x,y,z are coordinate positions in meters) and its output are three aectors [ax,ay,az] which are acceleration components in m/s<span class="math inline">\(^2\)</span>.</p></li> | ||
</ol></li> | ||
</ol> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# Homework #1 | ||
## due 9/15/17 | ||
|
||
1. The first assignment is to fork the course syllabus and assignment. | ||
|
||
a. Sign into your UConn github account via | ||
[github.uconn.edu](https://github.uconn.edu/). | ||
|
||
![Step 1](g1.jpg) | ||
|
||
![Step 2](g2.jpg) | ||
|
||
|
||
b. Go to | ||
[https://github.uconn.edu/rcc02007/ME3255S2017.git](https://github.uconn.edu/rcc02007/ME3255S2017.git) | ||
and watch the repository. | ||
|
||
c. Fork the repository to create your own version of the syllabus and assignments. | ||
|
||
2. The next assignment is to create your own repository named '01_ME3255_repo'. | ||
|
||
a. (if you signed out) Sign into your UConn github account via | ||
[github.uconn.edu](https://github.uconn.edu/). | ||
|
||
b. Follow these steps to create your own repository named `01_ME3255_repo`: | ||
|
||
i. Click the +-sign and choose 'New repository' | ||
![Step 3](g3.jpg)\ | ||
|
||
ii. In the 'Repository name' enter '01_ME3255_repo'. Add a description. Make it | ||
private. Then check the box 'Initialize this repository with a README'. | ||
|
||
![Step 4](g4.jpg)\ | ||
|
||
iii. Now you are in your repo. Click on the README.md file and then click the | ||
pencil to edit it. | ||
|
||
![Step 5](g5.jpg)\ | ||
|
||
iv. Add a header with a `#` and type `# Answer to Homework Question`. Under this | ||
line answer this question: What do you hope to learn this semester? | ||
|
||
![Step 6](g6.jpg)\ | ||
|
||
v. At bottom of page, click 'Commit changes'. | ||
|
||
![Step 7](g7.jpg)\ | ||
|
||
vi. Verify that your README.md file has been updated. Then copy the HTTPS clone | ||
URL on the right of the page. | ||
|
||
![Step 8](g8.jpg)\ | ||
|
||
vii. Paste this into the Homework #1 Google form reponse. | ||
[https://goo.gl/forms/b3YrBuFxZaXTYV5s1](https://goo.gl/forms/b3YrBuFxZaXTYV5s1) | ||
|
||
![Step 9](g9.jpg)\ | ||
|
||
viii. Click on the gear for "Settings" then "Collaborators" on the left menu. Add | ||
`rcc02007` (Ryan C. Cooper) and `zhs15101` (Zhiqiang Shen) as a collaborators. | ||
|
||
3. Use a script to create a variable called `A_66`, where every element is the product | ||
of the two indices from 1 to 6 e.g. A_66(3,2)=6 and A_66(4,4)=16. Calculate the mean and | ||
standard deviation of the values in A_66. | ||
|
||
3. Copy the data in | ||
[US_energy_by_sector.csv](https://github.uconn.edu/rcc02007/ME3255F2017/blob/master/03_Intro%20to%20matlab-octave/US_energy_by_sector.csv) | ||
to a file in you working directory in Matlab/Octave. Add these two plots to your | ||
01_ME3255_repo with a heading of `#Problem 4` | ||
|
||
a. Plot the US energy consumption from 1949 to 2016 for "Total Energy Consumed by the | ||
Residential Sector" and "Total Energy Consumed by the Transportation Sector" in trillions | ||
of Btu's. | ||
|
||
b. Plot the cumulative US energy consumption from 1949 to 2016 for "Total Energy Consumed by the | ||
Residential Sector" and "Total Energy Consumed by the Transportation Sector" in quintillions | ||
of Btu's (1 quintillion = 10$^6$ trillion). The cumulative energy is the area under | ||
the curve in part a from 1949 to a given year. | ||
|
||
3. In this part, you will modify the function presented in lecture `freefall.m`. In | ||
lecture, the function required an input of `N` to divide the 12 second solution into | ||
N-steps. Here, modify the input so that you can specify two inputs, step size-`h`, and | ||
timespan-`timespan`. | ||
|
||
a. Plot a comparison between calculated velocities v(t) for timesteps of h=0.1, 1, and | ||
5 sec from 0 to 30 seconds. | ||
|
||
b. Save the script that created the comparison plot as 'freefall_comparison.m' and the | ||
figure as figure01.png (use command `> print(figure01.png)`) | ||
|
||
c. Save your work to a folder called 'problem_3' and add it to the '01_ME3255_repo' | ||
repository | ||
|
||
4. In this part we will create functions that calculate velocity and acceleration in 3D | ||
based upon x,y,z-coordinates and time. | ||
|
||
a. Create a function that takes four vectors as input, x,y,z,t,(where x,y,z are | ||
coordinate positions in meters) and its output are three vectors [vx,vy,vz] which are | ||
velocity components in m/s. | ||
|
||
|
||
b. Create a function that takes four vectors as input, x,y,z,t,(where x,y,z are | ||
coordinate positions in meters) and its output are three aectors [ax,ay,az] which are | ||
acceleration components in m/s$^2$. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Extra Credit Assignment \#1 | ||
|
||
Go to Mathworks [Matlab Onramp](http://bit.ly/2q97vcS) and create an account. Complete | ||
Part 10 - "Review Problems" (Project - Electricity Usage) and (Project - Audio Frequency). | ||
|
||
Save your progress report and put it in a repository called 'ME3255-Extra_Credit'. |