PracticeTest_2 - CS1371 - Computing for Engineers Practice...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS1371 - Computing for Engineers Practice Test 2 Georgia Institute of Technology : College of Computing Practice Test 2 Part 1 – Multiple Choice 1. Given the following: x = [0 1 2 3 4 5 6 7 8] y = [0 2 4 6 8] plot(x, y, 'ro') What would the plot look like? A. A plot of red circular points with the given x and y values B. A solid red line connecting the given x and y values C. A curved fit for the given x and y values D. Error E. None of the above 2. Given the following: r = 10; th = linspace(0, 2*pi, 100) a = r.*cos(th); b = r.*sin(th); Which one of the below would plot a circle? A. plot(r, th) B. plot(a, th) C. plot(a, a) D. plot(r, b) E. plot(a, b) 3. The following MATLAB code is executed: A = struct('FirstName','George','Democrat',false); B = fieldnames(A); A.(B{2}) = true; What does the structure A look like after all of the code above has been executed? A. FirstName: ' George ' B. FirstName: ' George ' C. FirstName: ' George ' Democrat: 0 Democrat: 1 Democrat: 0 George: 0 D. FirstName: 'George' E. Error Democrat: 0 George: 1 Page 1 of 7
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS1371 - Computing for Engineers Practice Test 2 4. Which command below will create a grid of 12 graphs in a figure? A. subplot(12) B. subplot(3, 4, 1) C. subplot(1, 12) D. subplot(8, 4, 1) E. subplot(2, 12, 1) 5. Which choice below is NOT true about the following line of code? f1 = fopen( ' recipe.txt ' , ' r ' ) A. The file handle for ‘recipe.txt’ is stored in the variable f1 B. The text from ‘recipe.txt’ is stored in the cell array f1 C. The file has been opened with read only permission D. Both A and C E. Both B and C 6. A structure array is defined as follows: Person(1).name = 'Bob' Person(2).name = 'Joe' Person(1).dad = Person(2)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/08/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Institute of Technology.

Page1 / 7

PracticeTest_2 - CS1371 - Computing for Engineers Practice...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online