Docsity

MATH 240 MATLAB Project #0: Solving Matrices and Graphing Functions - Prof. Peter Wolfe, Study Guides, Projects, Research of Linear Algebra

Toggle sidebar
bg1
Dr. Wolfe MATH 240 MATLAB PROJECT #0 Due October 2, 2008
This project is to be done with MATLAB, and you should hand in your printed output.
Use the diary command to save your work. Edit the saved file to include your name, the
problem numbers, and the answers to any questions asked in the problems. Then print
your file. For further information on MATLAB, consult the introduction posted on the
class website. Whenever you use a new MATLAB command learn about it by using the
help command; e.g., type help ezplot to learn about the ezplot command.
1. Enter the Matrices and column vectors
A=1 2
3 4 , B =1−1
−2 4 , C =2−1 0
1 4 7 , D =3−5−1
763
x=3
5,y=−1
1
Note: To enter Atype [1 2; 3 4]
(a) Compute (if possible) A+B, AC, CA, Ax, By,4A−3B. Note: To multiply
matrices Aand Btype A∗B.
(b) Check that (A+B)C=AC +BC, A(C+D) = AC +AD, B (3x−2y) =
3Bx−2By.
(c) Compute A−1, A3, A2−5A−2I , AT. Note: The command for A−1is inv(A),
the command for A3is Aˆ3 and the command for ATis A′.
(d) Solve Bz=ywith the command B\y.
2. Ex.37, p.49, Lay Use the command rref.
3. Ex.12, p.101 Lay.
4. Ex.35, p.117 Lay.
5. Ex.9, p.132 Lay.
6. Use the ezplot command to graph the following functions
(a) y= sin xover [−2π, 2π].
(b) y=x2over [−1,3].
(c) y= sin2xover [0, π].
Note: Your graphs will not be saved by the use of the diary command. The command
print will cause the current graphics window to be printed at your default printer.
7. Type the following commands and observe the result:
x= 0 : .01 : 2 ∗pi; y= sin(x); plot(x, y)

Partial preview of the text

Download MATH 240 MATLAB Project #0: Solving Matrices and Graphing Functions - Prof. Peter Wolfe and more Study Guides, Projects, Research Linear Algebra in PDF only on Docsity!

Dr. Wolfe MATH 240 MATLAB PROJECT #0 Due October 2, 2008

This project is to be done with MATLAB, and you should hand in your printed output. Use the diary command to save your work. Edit the saved file to include your name, the problem numbers, and the answers to any questions asked in the problems. Then print your file. For further information on MATLAB, consult the introduction posted on the class website. Whenever you use a new MATLAB command learn about it by using the help command; e.g., type help ezplot to learn about the ezplot command.

  1. Enter the Matrices and column vectors

A =

, B =

, C =

, D =

x =

[

]

, y =

[

]

Note: To enter A type [1 2; 3 4] (a) Compute (if possible) A + B, AC, CA, Ax, By, 4 A − 3 B. Note: To multiply matrices A and B type A ∗ B. (b) Check that (A + B)C = AC + BC, A(C + D) = AC + AD, B(3x − 2 y) = 3 Bx − 2 By. (c) Compute A−^1 , A^3 , A^2 − 5 A − 2 I, AT^. Note: The command for A−^1 is inv(A), the command for A^3 is Aˆ3 and the command for AT^ is A′. (d) Solve Bz = y with the command B\y.

  1. Ex.37, p.49, Lay Use the command rref.
  2. Ex.12, p.101 Lay.
  3. Ex.35, p.117 Lay.
  4. Ex.9, p.132 Lay.
  5. Use the ezplot command to graph the following functions (a) y = sin x over [− 2 π, 2 π]. (b) y = x^2 over [− 1 , 3]. (c) y = sin^2 x over [0, π].

Note: Your graphs will not be saved by the use of the diary command. The command print will cause the current graphics window to be printed at your default printer.

  1. Type the following commands and observe the result: x = 0 : .01 : 2 ∗ pi; y = sin(x); plot(x, y)