Question: Create a Matlab function called tridfun.m that solves the tridiagonal system of equations Au=k. It is important to understand that there will be both a

Create a Matlab function called tridfun.m that solves the tridiagonal system of equations Au=k. It is important to understand that there will be both a main programtridmain.m and the function tridfun.m that the main program calls. To provide an example, suppose that A is the tridiagonal matrix A=10573 and k is the vector 13 27 43 41 Then your main program tridmain.m should closely resemble clear n = 4; a=[3 4 7 81; b=[5 63]; c=[1 53]; k = [13 27 43 411; u tridfun (n , a,b,c,k); = Here the command n=4 gives the size of the problem (A is 4 x 4, k is 4 1), vector a contains the diagonal entries of A, vector b contains the superdiagonal entries of A, and vector c contains the subdiagonal entries of A. Note that your code should not explicitly form the matrir A. If the code in your function tridfun.m works correctly, the vector u should be calculated as u=
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
