Study Guides (247,933)
Computing (53)
CISC 101 (5)
Midterm

# samplemidterm.pdf

4 Pages
149 Views

School
Department
Computing
Course
CISC 101
Professor
David Skillicorn
Semester
Fall

Description
Faculty of Arts and Science School of Computing CISC101 Sample Midterm Examination Instructor: D.B. Skillicorn Fall Term 2011 Instructions: 1. You have ﬁfty 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 ﬁnal 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 ﬁgure 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 diﬀerent 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
Me

OR

Join OneClass

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

Join to view

OR

By registering, I agree to the Terms and Privacy Policies
Just a few more details

So we can recommend you notes for your school.