Notes on Review Questions


As indicated on the handouts, some of the Matlab Review Questions and Sample Solutions are more sophisticated than what
would appear or be expected of you on Prelim 3.

The Matlab Sample Solutions are extremely concise to show you the expressive power of Matlab: As you gain experience in Matlab, your programs should become more concise and you should find such concise programs easier to read than the equivalent solutions using loops. (Think back to Assignment 7, Part B: The code for deleting rows of zeros can be read as "compute row sums, find which sums are non-zero, extract the non-zero rows".)

The key points to keep in mind for both Java and Matlab are: Your solutions should be (1) correct, (2) nicely commented, and preferably (3) concise. The latter (concise) is less important then the first two (correct and commented). Also keep in mind that on Prelim 3 that we will be giving you a Matlab cheat sheet and reminding you of any additional relevant Matlab functions.

We suggest you study Matlab by going over Assignment 7 --pick them up in Carpenter and look at the grader's comments!-- and then working through the review questions. Use loops if you can't figure a way without them.


Some of you might be confused about the use of TYPE and SEPARATOR on the Sample Solutions to the Matlab Review
questions.  TYPE is a built-in Matlab function that prints out the contents of a file. We used it to print out ("type out") the contents of each function file (we also used it on the Sample Solutions to Assignment 7).  The problem with TYPE is that it does not mark the end of a printout. This is why variable SEPARATOR was created and DISP'layed after each function file was TYPE'd.


Last update:  06/08/00 11:55