Dear CISC106-010 Students: Midterm #2 will be on Friday Nov. 9, 2007. Midterm #2 will be cumulative (cumulative in the sense that whatever we covered so far in the class will be included in the exam, but the main focus of this exam is the topics covered after the first midterm). Here is a guide for you on how to study for the Midterm: ------------------------------------------------------------------- * Study your lecture notes * Review and study the Labs 1-7 (Make sure to review the sections of the labs that did not ask you to submit any work, also). * Refer to the reading list (below) * Review the quizzes, practice questions, and Midterm #1 -------------------------------------------------------------------- There will be factual questions as well as problem-based questions in the exam. Factual questions will ask you to make definitions, explain the difference between the concepts, etc. For instance, - What is the main difference between disp and fprintf MATLAB built-in functions. - What MATLAB built-in function to use to open a text file in MATLAB for the purpose of reading from the file into the workspace. Problem-based questions will ask you to apply your knowledge into a problem. You can be asked - to complete a code piece, - identify the errors in a code piece, - given a problem in English text, write the MATLAB code, - given a function prototype, write the function body for the function - given a function A, write a function B to solve a given problem using the function A, etc. Two examples of a problem-based question is as follows. Question-1: Assume you have cell array named 'elements' that includes the names of some elements as rows of strings. That is; >> elements = {'Hydrogen'; 'Helium'; 'Lithium'; 'Boron'; 'Carbon'} elements = 'Hydrogen' 'Helium' 'Lithium' 'Boron' 'Carbon' Write two MATLAB code pieces to print the names of the elements into the screen using (a) for loop and (b) while loop Question-2: We have the cell array 'elements' as in Question-1 (above). We want to replace the element 'Boron' with element 'Neon'. Complete the rest of the assignment statements below to do the task (Note that, both (a) and (b) do the same job). (a) >> elements(4) = (b) >> elements{4} = Reading List: ------------------- MATLAB Book -------------------- Chp 1– About MATLAB Chp 2 – MATLAB Environment Chp 3 – Built-in MATLAB Functions Chp 6 – User-Defined Functions Chp 4 – Manipulating MATLAB Matrices AFTER MIDTERM #1 Chp 5 - Plotting (Section 1, for basic plotting) Chp 7 - User-Controlled Input and Output Chp 8 - Logical Functions and Control Structures Chp 10 - Other Kinds of Arrays (mainly Section 1 and Section 4 on Cell Arrays) ------------ UNIX book: ------------ Chp 1 – Getting Started with Unix Chp 2 – Using Directories and Files Chp 4 – Creating and Editing Files (read only pp 83-90 for vi, pp 91-95 for emacs) AFTER MIDTERM #1 Chp 5 -- Controlling Ownership & Permissions (especially for the 'chmod' Unix command)