Skip to content
Texas A&M University
Mathematics

Spring 2012 MATH 151 MATLAB Assignment 2

Description
  1. Students will work individually on this assignment.
  2. In Chapter 3 of Stewart, do the following problems.
    • p 232 #4, 9, 15, 32*
  3. For each problem, you'll work out of the MATLAB Editor. You'll interactively save and run your MATLAB M-file, writing input and output to a diary file. If you have graphics, print your figure files to a PDF file using print -dpdf FILENAME.pdf. Also print out any function M-files you create. For example, the files associated with the first problem could be named:
    • s232x04.m: M-file with MATLAB input commands and comments
    • f.m: Any function M-files you create
    • s232x04.txt: diary file with input and output interspersed
    • s232x04.pdf: PDF file for use with xprint in the calclabs
  4. You'll print out the .txt and .pdf files. Do any hand work on ruled notebook paper or engineering green graph paper.
  5. Regarding the figures themselves, interactively edit them. Put on labels; insert text or arrows; change line thicknesses; etc.
  6. This assignment is due 28 Mar, at the START of your computer lab. Be sure to manage your time according to your schedule. Do NOT put things off! It is highly advisable that you use the 50 minutes in lab to complete as much of the assignment as possible while your TA is available to help.
  7. When you finish, you will turn in the documentation of your Matlab work to your TA. Make sure the following information is on a cover sheet.
    • Spring 2012 Math 151 Matlab Assignment 2
    • Section xxx, Your Name, Student UIN
  8. Various MATLAB videos that you have viewed in advance show how to use xprint to print your diary .txt, graphics .pdf, and function .m files from CalcLab. Alternatively, transfer your files to the Open Access Lab or your personal computer using a flash drive, email, or FileZilla for printing.
Notes
  • For ALL problems: you should plot the function first to determine your initial "guess" x0, especially if no such value is given in the problem! Then use your own program (from the previous group project) or the function newton which was downloaded in your original setup. Type help newton in the Command Window to view syntax (NOTE that it requires the use of anonymous functions from Gilat ch 6! See the video for more details)
  • For #32, do not worry about where the equation comes from. Determine the answer accurate to four decimal places
  • There are samples of the types of problems you have to do in the MATLAB streaming video.

This page was last modified by djm on Thu, 05/Jan, 2012.