Document 10540241

advertisement
Lab 3 focuses on creating vectors (lists of numbers) and matrices (semicolons between lists to start new
rows), creating equally-partitioned rows using the colon notation or linspace, and creating new vectors
and matrices using subsets of the rows and columns of a given matrix. In addition, students will
continue to use the symbolic package to solve integral applications studied in lecture.
(NOTE: For the Gilat problems, students will NOT get credit for typing in the matrices/vectors
explicitly! They must use appropriate shortcut commands.)
g5c2p056x08 (colon or linspace): Creating a row vector with equally-spaced elements using colon
notation (p37) or linspace (p38). Here linspace is preferred since you are given the number of elements
rather than the increment (Delta-x).
g5c2p061x37 (addressing matrix elements): Students should use the colon notation to create the rows
of the matrix (with semicolons in between). See pp44-45 to refer to specific rows/columns of the given
matrix.
g5c2p062x41 (ones, zeros, eye): See pp40-41 for the ones, zeros, and eye (identity matrix) commands.
These can be put in "rows" or "columns" together to make new matrices, provided the dimensions
match. See Sample Problem 2-1 (the "different solution" at the top of p51) for an example.
s449x22 (int): Students need to set up the integral by hand, then use MATLAB to integrate as in the
previous lab.
s451x12 (int, solve): Students will use integration in MATLAB to calculate the average value (be sure
to define b as a symbolic variable as well!), then solve f_avg=3 for b.
Download