Prelim 1 Topics
Topics/Ideas
- Scalar variables and operations
- Selection (conditional)
- Iteration (while-loop, for-loop), including nested loops, and loop patterns/algorithms (e.g., accumulation, finding the best in a set)
- User-defined functions
- 1-dimensional array (vector)
- linear interpolation
- Vectorized code (as discussed in lecture)
For Prelim 1 you only need to recognize what is (or is not) vectorized
code; you do not need to write vectorized code.
- MATLAB predefined (built-in) functions (those used in lecture/discussion/projects)
- good programming style
Students are responsible for all material covered in lecture, discussion,
exercises, projects, and the assigned reading:
- Lecture: up to and including Lecture 12
, plus the part of
Lecture 13 on vectorized code.
Note that 2-d array (matrix) will NOT be covered in Prelim 1.
- Exercises: up to and including Exercise 6
- Projects: Projects 1, 2, and 3
- Assigned reading: See CS1112-->Lecture Materials,
up to and including Lecture 12
(Chapters 1-6)
Examples on how to use selected MATLAB predefined (built-in) functions
will be given on the exam. Do not use any built-in functions that have
not been discussed in lecture, discussion, homework, and assigned reading.
Write scripts and functions as specified in each exam question;
specifically, write functions and subfunctions
only if they are requested.
Read this note on vectorized code.
Matlab commands that students may not use:
- switch
- break
- continue
- return