MATLAB for Math 20D
Welcome to the MATLAB component of Math 20D. In this portion of the course, you will learn how to use MATLAB to analyze and solve ordinary differential equations (ODEs). The lab assignments are designed to introduce essential MATLAB commands while also helping you understand how numerical algorithms work behind the scenes. In addition, the labs reinforce key concepts from lecture and illustrate how differential equations arise in real-world applications relevant to science and engineering.
You can use MATLAB for free by creating a MathWorks account with your @ucsd.edu email address. After logging in, you may either download and install MATLAB on your computer or use MATLAB Online directly in your web browser.
To download MATLAB, sign in to your MathWorks account, navigate to the MATLAB product page, and follow the installation instructions for your operating system (Windows, macOS, or Linux). MATLAB Online is a good option if you are using a Chromebook or prefer not to install software. If you only have access to a tablet such as an iPad, you can use MATLAB Mobile to run basic commands and view files, although it has limited functionality.
If you are new to MATLAB or would like a guided introduction, you are encouraged to complete an online tutorial such as MATLAB Onramp , which provides a free, interactive introduction to basic MATLAB commands and workflows.
Starting with the second assignment, you will also need to create and manage MATLAB script files (M-files).
In general, each lab is self-contained and can be completed without prior MATLAB experience, although some assignments depend on commands learned in earlier labs.
| Assignments | 1. Introduction to MATLAB | Due at 11:59pm on Friday, Jan 16 PT |
| 2. Visualizing Solutions to ODEs | Due at 11:59pm on Friday, Jan 30 PT | |
| 3. Numerical Methods | Due at 11:59pm on Friday, Feb 13 PT | |
| 4. Systems of ODEs | Due at 11:59pm on Friday, Feb 27 PT |
Homework should be uploaded to Gradescope by 11:59 pm (San Diego time) on the listed due dates. Each assignment allows a 3-day late submission period, ending at 11:59 pm on Monday. Submissions received after this late period will not be accepted.
When submitting your homework on Gradescope, please make sure to assign the correct pages to each question. Failure to assign pages properly may result in point deductions.
Each assignment is released two weeks before its due date. Please plan your time accordingly and start the assignments early.
Two random exercises will be graded for each assignment.
MATLAB Tutoring
Please refer to the Tutor Hours page for information about MATLAB tutoring and available tutoring hours.
The MATLAB Quiz
During the last week of the quarter, you will have to take a MATLAB quiz.
- You will be tested on your ability to use rudimentary MATLAB commands to solve basic computational problems and on your understanding of topics covered in the lab assignments.
- The quiz will cover Assignments 1 through 4.
- You can make use of gradescope and the course websites but no other websites.
- The quiz is scheduled for one hour, although you most likely will not need the full amount of time.
- Open book and notes. But you may not disclose the exam problems to any other person during the quiz days. Any sign of disclosure will be reported immediately to the Academic Integrity Office.
- The quiz will be offered in Quizzes on Canvas. The problems are in the forms of multiple choices, numerical answers, etc. You don't need to write/scan anything.
Quiz Time
The MATLAB final quiz will be held
| 11:59 pm PT on Tuesday, March 10 until 11:59 pm PT on Wednesday, March 11 |
| in "Quizzes" section on Canvas. |
You can take it whenever the time is convenient for you during the period. The quiz starts the first time you access the quiz and ends after 60 minutes.
We do not offer make-up quizzes if you miss your quiz.
Feedback
If you have any suggestions or comments about the lab assignments, we'd love to hear from you. Also, if you encounter any mistakes or broken links, let us know. Send an email to jiw133@ucsd.edu. Please include in the email your class information like the lecture code or your instructor. Also, note that the MATLAB TA only coordinates the MATLAB part. You should ask your regular TAs questions about regular lecture material.
References
Books:
- Boyce, William E. and Richard C. DiPrima. Elementary
Differential Equations and Boundary Value Problems. 8th ed.
Hoboken, NJ: John Wiley & Sons, Inc., 2005.
This is the textbook for most of the Math 20D course. - Kreysig, Erwin. Advanced Engineering Mathematics. 7th ed.
New York: John Wiley & Sons, Inc., 1993.
This book explains many of the applications of differential equations to science and engineering. - Stewart, James. Calculus - Early Transcendentals. 5th ed.
Pacific Grove, CA: Brooks/Cole, 2003.
This is also a textbook for Math 20D, covering the first few weeks of the course.
Web Sites:
- Wikipedia
An excellent resource for articles on mathematical topics. - The Millenium Problems
The Clay Mathematics Institute has offered a million dollar prize for the solution of a variety of open problems in mathematics. One such problem involves solving the Navier-Stokes equations, which are a set of differential equations. - MacTutor Archive
The MacTutor History of Mathematics Archive is a comprehensive reference for information about mathematicians and the history of mathematics. Biographies of mathematicians mentioned in these assignments are found on this site. - BCIT Math Applications
This site is a great resource for finding applications of math to the real world. - MathWorks
MathWorks is the creator of MATLAB. Product information and help can be found here. - UCSD Math
This is the home page for the UCSD Department of Mathematics. - UCSD ETS
This is the ETS (Educational Technology Services) home page, containing resources for computing at UCSD.
Acknowledgments
| Faculty Coordinator | Professor Jiawang Nie |
| Graduate Student Coordinator | Jiajia Wang |
| Recent Faculty Coordinators | Professor Helton |
| Previous Faculty Coordinators | Professor Bunch Professor Driver Professor Eggers Professor Holst Professor Leok Professor Li |
| Previous Graduate Student Coordinators | Jay Cummings Liz Fenwick John Geller James Hall Dan Hoff Derek Newland Håkan Nordgren Jacek Nowacki Sean Raleigh Alon Regev Timothy Swec Itai Maimon Xiaomeng Hu Jiyoung Choi |
Last Modified: March 24, 2025