Study Guides (247,933)
Canada (121,177)
Computing (53)
CISC 101 (5)


4 Pages
Unlock Document

CISC 101
David Skillicorn

Faculty of Arts and Science School of Computing CISC101 Sample Midterm Examination Instructor: D.B. Skillicorn Fall Term 2011 Instructions: 1. You have fifty minutes. Attempt all questions. 2. You may bring in one 8.5x11 sheet of paper containing notes, and use it during this midterm. 3. Answer questions on the examination paper. Nothing else will be marked. Use the amount of space under each question as a guide to the detail of your answer. You may use scrap paper and the back of the examination paper pages for rough working. 4. If you do not understand a question, make reasonable assumptions, write them down and proceed. 5. Make sure your name is on every page of the examination paper. 6. The total mark for this midterm is 50. The midterm counts for 10% or 20% of your final grade, depending on which would give you the better mark. NAME: STUDENT NUMBER Student number: Page 2 of 4 1. (1 minutes) What is the meaning of semicolons in Matlab programs? 2. (2 minutes) Explain the meaning of precedence in arithmetic expressions. 3. (3 minutes) Explain what the image command does in Matlab. 4. (3 minutes) Explain what the disp command does in Matlab. 5. (2 minutes) What is meant by a target or class attribute in a dataset? 6. (2 minutes) What is prediction from a dataset? 7. (2 minutes) What is meant by an attribute in a dataset? 8. (3 minutes) Explain what the following Matlab code does. plot(a(:,2),a(:,5),’gx’); 9. (3 minutes) Explain how you would label the axes of the plot resulting from a plot3 command, and provide the figure with a title. 10. (4 minutes) Write logical or boolean expressions that evaluate as true for the following situations: ▯ a is greater than 3 ▯ a is negative ▯ a lies between -2 and -2 or between +1 and +2 ▯ a is less than twice the value in b 11. (10 minutes) Write a loop that, given a vector x of length n, will replace all values greater than 25 or smaller than -25 by zeroes. 12. (10 minutes) Write a loop that, given a vector x of length n, will count the number of times that the value 3 appears in the vector. 13. (10 minutes) Suppose that a is a 100▯100 matrix. Write the single Matlab commands that will select the following pieces of the matrix: ▯ the 5th column; ▯ the 17th row; ▯ the upper left hand corner submatrix of size 10 ▯ 10; ▯ the elements of the 12th column in odd numbered rows. 14. (5 minutes) Explain two different ways of normalizing data in a dataset. Student number: Page 3 of 4 15. (10 minutes) Write Matlab code to compute the column means of a matrix named b of size n rows and m columns, without using the built-in commands mean or sum. 16. (25 minutes) Write Matlab
More Less

Related notes for CISC 101

Log In


Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.