Slides_2010_01_27

# Slides_2010_01_27 - Applied linear algebra and numerical...

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

Applied linear algebra and numerical analysis Session 10 Prof. Ulrich Hetmaniuk Department of Applied Mathematics January 27, 2010

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

View Full Document
Example Compute the rank, the nullity and a basis for the nullspace for A = 2 8 6 0 - 2 6 8 14 1 4 3 0 1 2 1 - 2 (rank = 2, nullity = 2)
Matlab Example Program a function g deﬁned for any square matrix such that g ±² 1 2 3 4 ³´ = 2 + 3 = 5 g 1 2 3 4 5 6 7 8 9 = 3 + 5 + 7 = 15

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

View Full Document
Matlab Function Page 1 homework03_g.m Printed: 1/27/10 4:22:32 PM Printed For: h e function tt = MyFunction(A) % % Computes the sum of the 'opposite' diagonal entries % of a square matrix. % % Input: % * A square matrix A % % Output: % * The sum of the 'opposite' diagonal % % Example: % % A = [2, 1; % 3, 5] % % The result is 1 + 3 = 4. % % UH (01/10) n = size(A, 1); if (n ~= size(A, 2)) error('\n The function g works only with square matrices ! \n'); end tt = 0.0; for ii = 1:n, tt = tt + A(ii, n+1 - ii); end Save in “MyFunction.m” & call with MyFunction(A).
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 03/31/2010 for the course AMATH 352 taught by Professor Leveque during the Winter '07 term at University of Washington.

### Page1 / 9

Slides_2010_01_27 - Applied linear algebra and numerical...

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

View Full Document
Ask a homework question - tutors are online