problem1_matrixmanip.m 210 B

1234567891011121314
  1. A = [ 2 4 -1 3 5;
  2. 0 -2 7 1 4;
  3. 3 5 0 -6 2;
  4. 8 -1 4 2 0;
  5. 1 3 5 -2 6];
  6. % Part A
  7. [A_row, A_col] = find(A==7)
  8. % Part B
  9. A_submatrix = A(2:4, 2:4)
  10. % Part C
  11. B = [A(:,1) A(:,3)]