Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2) Create a Matlab function called, for example, smith jones.tridf un.m that solves the tridiagonal system of equations It is important to understand that there
2) Create a Matlab function called, for example, smith jones.tridf un.m that solves the tridiagonal system of equations It is important to understand that there will be both a main program smith-jones-tridmain.m and the function smith jones.tridfun.m that the main program calls To provide an example, suppose that A is the tridiagonal matrix 1 4 6 0 0 5 7 3 and k is the vector 13 27 43 Then your main program smith jones.tridmain.m should closely resemble clear; a=[3 4 7 8]; k[13 27 43 41]; u - smith jones tridfun (n,a,b,c,k); Here the command n-4 gives the size of the problem (A is 4 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 matriz A. If the code in your function smith-jones-tridfun.m works correctly, the vector u should be calculated as
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started