Page 67 - A Guide to MATLAB for Beginners and Experienced Users
P. 67

Practice Set A



                     Algebra and


                     Arithmetic













                            Problems 3–8 require the Symbolic Math Toolbox. The others do not.
                      1. Compute:
                        (a) 1111 − 345.
                        (b) e 14  and 382801π to 15 digits each. Which is bigger?
                         (c) the fractions 2709/1024, 10583/4000, and 2024/765. Which of these
                                                        √
                            is the best approximation to  7?
                      2. Compute to 15 digits:
                        (a) cosh(0.1).
                        (b) ln(2). (Hint: The natural logarithm in MATLAB is called log, not
                            ln.)
                         (c) arctan(1/2). (Hint: The inverse tangent function in MATLAB is called
                            atan, not arctan.)
                      3. Solve (symbolically) the system of linear equations
                            
                             3x + 4y + 5z = 2
                              2x − 3y + 7z =−1
                                x − 6y + z = 3.
                            
                        Check your answer using matrix multiplication.
                      4. Try to solve the system of linear equations
                            
                             3x − 9y + 8z = 2
                              2x − 3y + 7z =−1
                                x − 6y + z = 3.
                            
                        What happens? Can you see why? Again check your answer using matrix
                        multiplication. Is the answer “correct”?
                                               4
                                                    4
                      5. Factor the polynomial x − y .
                     48
   62   63   64   65   66   67   68   69   70   71   72