Matlab Hw 1

# Matlab Hw 1 - >> H=[c1 c2 H = 0 4-1-2 3 5...

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

Sheet1 Page 1 Warning: MATLAB Toolbox Path Cache is out of date and is not being used. Type 'help toolbox_path_cache' for more info A=[4 -3 B=[1 2 4 C=[5 >> % 1.) >> %a) >> A A = 04/03/11 2 1 0 6 >> %b) >> A(2,:) ans = 2 1 >> %c) >> A(3,2) ans = 6 >> %d) >> B(:,3) ans = 4 1 5 >> %e) >> B(:,1:2) ans = 1 2 2 4 0 1 >> %f) >> A(2:3,:)

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

View Full Document
Sheet1 Page 2 ans = 2 1 0 6 >> %2.) >> D=A D = 04/03/11 2 1 0 6 >> %a) >> D(1,1)=12 D = 12/03/11 2 1 0 6 >> %b) >> D(3,2)=-8 D = 12/03/11 2 1 0 -8 >> E=[D C] E = 12/03/05 2 1 8 0 -8 7 >> % E is equal to the matrix D with the contents of Matrix C added as a third column >> F=[D B] F = 12 -3 1 2 4 2 1 2 4 1 0 -8 0 1 5 >> %Matrix F is the the two columns of matrix D followed by the % three columns contained in matrix B
Sheet1 Page 3 >> G= [E G = 12/03/05 2 1 8 0 -8 7 1 2 4 2 4 1 0 1 5 >> % G is the three rows contained in Matrix E followed by the three rows contained in matrix B >> >> %3.) >> %a) >> c1= [0 c1 = 0 -1 3 5 >> %b) >> c2=[4 c2 = 4 -2 0 7 >> %c)H=[c1 c2]

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

View Full Document

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

View Full Document

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: >> H=[c1 c2] H = 0 4-1 -2 3 5 7 >> %d) >> K=[c1 c1 c2] K = 0 0 4-1 -1 -2 Sheet1 Page 4 3 3 5 5 7 >> %4.) >> %a) >> r1=[2 -1 5] r1 = 02/01/05 >> %b) >> r2=[7 9 -3] r2 = 07/09/03 >> %c) >> M=[r1 M = 02/01/05 07/09/03 >> %d) >> 3*r1 ans = 06/03/15 >> %The above command multiplied each component of matrix r1 by the scalar number three >> %e) >> r1+r2 ans = 9 8 2 >> %The above command added each component of r1 to the matching component of % r2 creating a new matrix also with three components >> %f) >> [r1 ans = 02/01/05-5 -10 8 Sheet1 Page 5 07/09/03 >> %The command formed a new matrix where the first row ir r1, the second row is r1-r2, and the third row is r2 Sheet1 Page 6 2 1 0 6] 2 4 1 0 1 5] 8 7] Sheet1 Page 7 Sheet1 Page 8 B]-1 3 5]-2 0 7] Sheet1 Page 9 r2] r1-r2 r2] Sheet1 Page 10...
View Full Document

## This note was uploaded on 04/27/2011 for the course MATH 265 taught by Professor Rounds during the Spring '11 term at Purdue.

### Page1 / 10

Matlab Hw 1 - >> H=[c1 c2 H = 0 4-1-2 3 5...

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

View Full Document
Ask a homework question - tutors are online