Fall 2023: Math 98
Contact Information
Email: michael_heinz@berkeley.edu
- Resort to email only in case of personal emergencies. For math, programming, and logistic questions, please utilize the Ed forum or try to attend office hours.
Class Time and Location
- Section 009 (CCN 22032): Tu/Th 9:30-11 AM, B3A Evans Hall
- Section 010 (CCN 22033): Tu/Th 11 AM-12:30 PM, B3A Evans Hall
Office Hours
- Tu/Th 12:30-2 PM, 1044 Evans Hall (08/24/22 - 10/05/22)
Ed Forum
- https://edstem.org/us/courses/42772/
- Please use this to ask all your math, programming, and logistic questions.
Installing MATLAB
You can download MATLAB here for free through the UC Berkeley campus license. If you encounter any issues, try contacting campus technical support and clearly describe your issue. Neither I nor the 128a Professor/GSIs can help you with this.
Note that concurrent enrollment students do not have access to this campus license. I have been told new/re-entry students and those with unpaid bills have encountered some issues in the past.
References
This course has no primary texts. I would recommend you check out some of the following tutorials (in increasing order of length/detail).
- (CX) Christos Xenophontos, A Beginner’s Guide to MATLAB (online)
- (DH) David Houcque, Introduction to MATLAB For Engineering Students (online)
- (BH and DV) Brian H Hahn and Daniel T Valentine, Essential MATLAB for Engineers and Scientists
More Practice Problems
Here are some great sources of additional practice problems for you to work on your programming ability. I use many of these as in-class/homework exercises.
- Project Euler
- HackerRank (in particular: algorithms and mathematics)
- Geeks for Geeks (in particular the problems on Mathematical Algorithms)
Schedule
Lecture | Topic | Notes | Additional Info |
---|---|---|---|
Lecture 1: 08/24/2023 | Intro: Math in MATLAB, matrices/vectors, Scripts | Lecture 1 | Braun MATLAB Tutorial |
Lecture 1 (con’t): 08/29/2023 | Intro: Math in MATLAB, matrices/vectors, Scripts | Lecture 1 | Braun MATLAB Tutorial |
Lecture 2: 08/31/2023 | Functions | Lecture 2 | MATLAB Documentation on Functions |
Lecture 3: 09/05/2023 | Control flow and loops (if else, for, while, etc.) | Lecture 3 | MATLAB Documentation on Control Flow |
Lecture 4: 09/07/2023 | Plotting | Lecture 4 | MATLAB Documentation on plot MATLAB Documentation on scatter |
Lecture 5: 09/12/2023 (Optional) | Debugging, Iteration, and Recursion | Lecture 5 | MATLAB Documentation on Debugging |
Codes
Here are some of the codes I demonstrate in class and the solutions to the in class exercises.
- Lecture 1: conversion.m, Lesson2MOOC.m, fillintheblank.m
- Lecture 2: myfun.m, sumrowscols.m, checkerboard.m, myStats.m, myCosine.m, makeCubic.m
- Lecture 3: comparison.m, quadroots.m, sumCubes.m, testPrime.m, manyFrogs.m, bisection.m, newton.m
- Lecture 4: MOOCplotting.m, cosineplotting.m, plotmisc.m, heart.m, SinCosPlot.m
- Lecture 5: bisectionbuggy.m, myFactorial.m, fiboRec.m, fiboLin.m, nested_sqrt.m, qsort.m
Assignments:
Each assignment will be due on the specified date by 11:59pm on bCourses. There is a one-hour grace period in submission. Solutions will be available through bCourses the following day at 12:59am. Please do your best to keep up, and let me know if you need more time. The n-th assignment requires up to the n-th lecture.
Due Date | Assignment | Solutions (on bCourses) |
---|---|---|
09/05/2023 (Tues) | Homework 1 | Homework 1 Solutions |
09/07/2023 (Thurs) | Homework 2 | Homework 2 Solutions |
09/12/2023 (Tues) | Homework 3 | Homework 3 Solutions |
09/14/2023 (Thurs) | Homework 4 | Homework 4 Solutions |
10/05/2023 (Thurs) | Project | Project Solutions |
Passing the Course
- This is a 1-unit P/NP class.
- The four homework assignments are each with 15 points. These will be spot checked for effort/completion.
- The project will be worth 40 points. This will be graded for accuracy.
- The passing requirement is 70% average on the homework assignments and a 70% on the project.
Supplemental Lecture Videos
These videos (mostly from Coursera) are provided as optional supplemental material that you can refer to. The videos are very basic, slow-paced, and detailed. If this type of learning is appealing to you, I suggest playing them at 1.5-2x speed and skipping over the basic mathematical explanations (like the ones about matrix addition and multiplication in Lecture 1).
The Coursera Videos follow the text Computer Programming with MATLAB (2013) by J. Michael Fitzpatrick, Ákos Lédeczi.
- Lecture 1: Matrices and Vectors (from Coursera MOOC) (81:48)
- Introduction to Matrices and Operators (11:25)
- The Colon Operator (8:45)
- Accessing Parts of a Matrix (21:33)
- Combining and Transforming Matrices (10:06)
- Arithmetic Part 1 (18:07)
- Arithmetic Part 2 (11:52)
- A complete transcript of all the commands he explains can be found in Lesson2MOOC.m.
- Lecture 2: Functions (from Coursera MOOC) (39:42)
- Introductions to Functions (5:39)
- Function Input/Output (22:15)
- Formal Definition of Functions (2:52)
- Subfunctions (6:17)
- Advantages of Functions (2:39)
- Lecture 3: Control Flow Basics (from Coursera MOOC) (111:15)
- Selection (11:53)
- If-Statements, continued (8:33)
- Nested If-Statements (2:12)
- For-Loops (38:50)
- While-Loops (20:16)
- Break Statement (29:31)
- Lecture 4: Plotting Basics (from Coursera MOOC) (17:47)
- Lecture 5: Debugging Basics (from Ilya Mikhelson) (10:39)