User Tools

Site Tools


gibson:teaching:fall-2013:math445:lab1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gibson:teaching:fall-2013:math445:lab1 [2013/08/26 18:37]
gibson
gibson:teaching:fall-2013:math445:lab1 [2013/08/28 18:33] (current)
gibson
Line 1: Line 1:
 ====== Math 445 Lab #1 ====== ====== Math 445 Lab #1 ======
  
-These problems are taken from Attaway chapter 1, both 2nd and 3rd editions. ​ +These problems are taken from Attaway chapter 1, both 2nd and 3rd editions. ​Remember, Matlab'​s //help// function is your friend.
  
 **Problem 1:** Evaluate these expressions in your head and write down the answer. Then evaluate them with Matlab. If you made a mistake, figure out what it was.  **Problem 1:** Evaluate these expressions in your head and write down the answer. Then evaluate them with Matlab. If you made a mistake, figure out what it was. 
Line 16: Line 16:
  
  
-**Problem 2:** What is the type of the answers in problem ​5?+**Problem 2:** What is the type of the answers in problem ​1?
  
-**Problem 3:** Use //intmin// and //intmax// to determine the range of values that can be stored in the types //uint32// and //unint64//Express the answer both as an integer ​and in scientific notation.+**Problem 3:** Use //intmin// and //intmax// to determine the range of values that can be stored in the types //uint32// and //unint64//Express the answers ​as integers ​and in scientific notation.
  
 **Problem 4:** Wind chill factor: The WCF conveys how cold it feels with a given air  **Problem 4:** Wind chill factor: The WCF conveys how cold it feels with a given air 
Line 44: Line 44:
  is fix(-3.2) == floor(-3.2)?​  is fix(-3.2) == floor(-3.2)?​
  
- is fix(-3.2) ​=== ceil(-3.2)?+ is fix(-3.2) == ceil(-3.2)?
  
-What is the type of //​fix(-3.2) ​=== ceil(-3.2)//?​+What is the type of //fix(-3.2) == ceil(-3.2)//?​
  
 **Problem 6:** Find Matlab expressions for **Problem 6:** Find Matlab expressions for
Line 56: Line 56:
  ​tangent of pi  ​tangent of pi
  
-Evaluate the expressions. Do you notice anything unexpected?+Evaluate the expressions. Do you notice anything unexpected? Can you explain it?
  
 **Problem 7:** Generate random numbers **Problem 7:** Generate random numbers
Line 88: Line 88:
   xor(5 < 6, 8 > 4)   xor(5 < 6, 8 > 4)
   ​   ​
 +What is the type of each of the answers?
 +
 **Problem 10:** The geometric mean g of n numbers $x_1, x_2, \ldots, x_n$ is given by **Problem 10:** The geometric mean g of n numbers $x_1, x_2, \ldots, x_n$ is given by
  
 <​latex>​ <​latex>​
-  g = sqrt[n]{x_1 x_2 \ldots x_n}+  g = \sqrt[n]{x_1 x_2 \ldots x_n}
 </​latex>​ </​latex>​
  
Line 97: Line 99:
    
 <​latex>​ <​latex>​
-  sqrt[3]{1.15 \cdot 1.05 \cdot 1.10}+  ​\sqrt[3]{1.15 \cdot 1.05 \cdot 1.10}
 </​latex>​ </​latex>​
  
gibson/teaching/fall-2013/math445/lab1.1377567434.txt.gz · Last modified: 2013/08/26 18:37 by gibson