====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
gibson:teaching:spring-2015:math445:lab1 [2015/01/19 18:48] gibson |
gibson:teaching:spring-2015:math445:lab1 [2015/01/21 12:52] (current) gibson |
||
---|---|---|---|
Line 32: | Line 32: | ||
- | **Problem 3:** Wind chill factor: The WCF conveys how cold it feels with a given air | + | **Problem 3:** Wind chill factor: The WCF supposedly conveys how cold it feels with a given air |
temperature T (degrees Farenheit) and wind speed V (miles per hour). A formula | temperature T (degrees Farenheit) and wind speed V (miles per hour). A formula | ||
for WCF is | for WCF is | ||
Line 49: | Line 49: | ||
\end{eqnarray*} | \end{eqnarray*} | ||
- | This is useful, for example, in finding the average rate of return on an investment with varying yearly return. If an investment returns 15% its first year, 5% its second, and 10% its third, the average rate of return is | + | This is useful, for example, in finding the average rate of return on an investment with varying yearly return. |
+ | |||
+ | **(a)** If an investment returns 15% its first year, 5% its second, and 10% its third, the average rate of return is | ||
\begin{eqnarray*} | \begin{eqnarray*} | ||
Line 56: | Line 58: | ||
Compute the average rate of return, expressed as a percent. | Compute the average rate of return, expressed as a percent. | ||
+ | |||
+ | **(b)**Which is better, a steady 5% per year return on investment, or alternating between 0% and 10% year by year? | ||
| | ||
- | **Problem 5:** The astoundingly brilliant but short-lived mathematician Srinivasa Ramanujan devised the following very powerful formula for for $1/\pi$ | + | **Problem 5:** The astoundingly brilliant but short-lived mathematician [[http://en.wikipedia.org/wiki/Srinivasa_Ramanujan | Srinivasa Ramanujan]] devised the following very powerful formula for for $1/\pi$ |
\begin{eqnarray*} | \begin{eqnarray*} | ||
Line 94: | Line 98: | ||
(3 == 2) + 1 | (3 == 2) + 1 | ||
| | ||
+ | **Problem 9:** If P is a logical expression, the law of noncontradiction states that P AND (NOT P) is always false. Use Matlab to verify this for both P false and P true. | ||
+ | |||
+ | **Problem 10:** Let P and Q be logical expressions. De Morgan's rule states that NOT (P OR Q) = (NOT P) AND (NOT Q) and also that NOT (P AND Q) = (NOT P) OR (NOT Q). Demonstrate with Matlab that both these rules hold for all possible combinations of P and Q. | ||
+ | |||
+ | **Problem 11:** Construct an equivalent logical expression for P OR Q using only AND and NOT. Translate that into Matlab and then test for all possible values of P and Q. Write your demonstration in the following fashion, in order to make it easy to follow | ||
+ | |||
+ | <code matlab> | ||
+ | P=0; Q=0; (my expression) == (P || Q) | ||
+ | P=1; Q=0; (my expression) == (P || Q) | ||
+ | </code> | ||
+ | etc. | ||
+ | **Problem 12:** Construct an equivalent logical expression for P AND Q using only OR and NOT. Translate that into Matlab and then test for all possible values of P and Q. Folow the same kind of pattern as in problem 11. |