CS1371_Practice_Test_3_Fall07

# CS1371_Practice_Test_3_Fall07 - CS 1371 Practice Test III...

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

CS 1371 Practice Test III Fall 2007 Problem 1 - Matrices A. Which of the following blocks of code returns the values of x, y, and z from the system of equations listed below? 2x + 5y + 7z = 9 3x + 3z = 2 x + 3y + 2z = 5 A. A=[1, 3, 2; 3, 0, 3; 2, 5, 7] B=[2; 9; 5] inv(A)*B B. A=[2, 5, 7; 3, 0, 3; 1, 3, 2] B=[9;5;2] A.^-1*B C. A=[2, 5, 7; 3, 0, 3; 1, 3, 2] B=[9; 2; 5] inv(A)*B D. A=[3, 0, 3; 2, 5, 7; 1, 3, 2] B=[2; 9; 5] A.^-1*B B. Read the code below and answer the questions that follow: A = [1:4; 2:5; 3:6; 4:7]; B = A(end:-1:1, end:-1:1); C = A; C(1:3,[1 3]) = B(4:-1:2,[4 2]); D = C’; E = [B(end,end), 0]; What is the value of the following variables after the following code above is executed? A = _______________________________________________________ B = _______________________________________________________ C = _______________________________________________________ D = _______________________________________________________ E = _______________________________________________________

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

View Full Document
C. Write a function called myTranspose that takes in a matrix and returns the transpose of it. Note:
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 04/21/2008 for the course CS 1371 taught by Professor Stallworth during the Fall '08 term at Georgia Tech.

### Page1 / 5

CS1371_Practice_Test_3_Fall07 - CS 1371 Practice Test III...

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

View Full Document
Ask a homework question - tutors are online