This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 999 . Take the vector b such that b i = 2 * ( . 001) 2 . Use LU factorization and forward and back substitution to solve A x = b and plot the vector x using the matlab command plot(x) . Hand in your scripts and your diary. This linear system arises when approximating the dierential equation x 00 ( t ) = 2 , < t < 1 , x (0) = x (1) = 0 using a nite dierence method (which well discuss later in the semester). This problem is called a two point boundary value problem. The exact solution is x ( t ) = t (1t ) . Hint : Use for loops to assign the matrix values. For example, n=1000; a=zeros(n,n); for i=1:n1 a(i,i) = 2; a(i,i+1) = 1; a(i+1,i) = 1; end a(n,n) = 2;...
View
Full
Document
This note was uploaded on 03/20/2008 for the course ASE 211 taught by Professor N/a during the Spring '08 term at University of Texas at Austin.
 Spring '08
 N/A

Click to edit the document details