User Tools

Site Tools


gibson:teaching:spring-2015:math445:lab3

====== 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:spring-2015:math445:lab3 [2015/02/02 13:14]
gibson
gibson:teaching:spring-2015:math445:lab3 [2015/02/02 13:29] (current)
gibson
Line 1: Line 1:
-====== Math 445 lab 3 ======+====== Math 445 lab 3: linear algebra ​======
  
-**Problem 1:** Compute the following products in your head or with pencil and paper, and then check your answers with Matlab. Note: one of the problems is not well-posed.+**Problem 1:** Compute the following products in your head or with pencil and paper, and then check your answers with Matlab. Note: one of the problems is not well-posed ​and therefore does not have an answer
  
 **(a)** ​ **(a)** ​
Line 32: Line 32:
 y =  y = 
 \left[\begin{array}{ccc} \left[\begin{array}{ccc}
--5 & 6 2+-5 & 6 2
 \end{array} \right] \end{array} \right]
 </​latex>​. </​latex>​.
- What is $xy$+ What is $xy$?
  
 **%%(c)%%** **%%(c)%%**
Line 77: Line 77:
  What is $AB$?  What is $AB$?
  
-**Problem ​5:** In Matlab, create ​a 2 x 2 matrix ​+**Problem ​2:** Suggest ​slight modification that turns the ill-posed problem from **1** into a well-posed problem, and then compute it by hand and with Matlab. 
 + 
 +**Problem 3:** Given the 2 x 2 matrix ​
 <​latex>​ <​latex>​
-= \left[+= \left[
 \begin{array}{cc} \begin{array}{cc}
 4 & 2 \\ 4 & 2 \\
Line 86: Line 88:
 \right] \right]
 </​latex>​ </​latex>​
-and 2-d vector+and the 2-d vector
 <​latex>​ <​latex>​
 b = \left[ b = \left[
Line 94: Line 96:
 \end{array} \end{array}
 \right] \right]
-</​latex>​. +</​latex>​ 
-What vector $x$ satisfies $Ax=b$?+ what vector $x$ satisfies $Ax=b$? ​Solve with pencil and paper and with Matlab.  
 + 
 +**Problem 4:** Use Matlab to solve the problem. Nilanjana has 40 coins worth %%$%%6.40. They'​re all quarters and nickels. How many nickels and how many quarters does she have? Verify that your answer solves the problem.  
 + 
 +Hint: convert the story problem to an $Ax=b$ problem and then solve that with Matlab.  
 + 
 +**Problem 5:** Use Matlab to solve the problem. Suhasini has 44 coins worth %%$%%7.50. They'​re all quarter, dimes, and nickels. She has twice as many dimes as nickels. How many of each type of coin does she have? Find the answer, and then verify that the solution satisfies the problem.  
 + 
 +**Problem 6:** Use Matlab to solve the following problem (from //Numerical Computing with Matlab// by Clive Moler). 
 + 
 +{{:​gibson:​teaching:​fall-2012:​math445:​truss2.png?​direct&​600}}
  
-**Problem 6:** Use Matlab to solve the problemNilanjana has 40 coins worth %%$%%6.40. They'​re all quarters and nickels. How many nickels and how many quarters does she haveVerify that your answer solves the problem. ​+{{:gibson:​teaching:​fall-2012:​math445:​truss3.png?direct&​600}}
  
-HintsConvert the story problem into two equations in two unknowns. Then rewrite this system of equations in matrix-vector notation, $Ax=b$, where $A$ are the known coefficients of the linear equations, $x$ a vector of unknowns, and $b$ a vector of known constants. ​ Enter the matrix $A$ and the known vector $b$ into Matlab, then solve for $x$ using Matlab'​s backslash operator''​x = A\b''​+{{:gibson:​teaching:​fall-2012:​math445:truss4.png?​direct&​600}}
  
-**Problem 7:** Use Matlab to solve the problem. Suhasini has 44 coins worth %%$%%7.50. They'​re all quarter, dimes, ​and nickelsShe has twice as many dimes as nickels. How many of each type of coin does she have? Find the answerand then verify ​that the solution satisfies the problem+One of the main challenges of this problem ​is figuring out how to enter the elements of the matrix quickly ​and reliablyFor a small matrix, it's easy to type out the matrix explicitly like ''​A = [ 1 9 7 ; 4 3 8 ; 6 2 0]'',​ but for a 13 x 13 matrix with 169 elements, that's tedious and error prone.
gibson/teaching/spring-2015/math445/lab3.1422911658.txt.gz · Last modified: 2015/02/02 13:14 by gibson