Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE ANSWER ALL 3 EXERCISES!!!!!!! THANK YOU. I NEED A SOLUTION TO EXERCISE 1, 2, AND 3!!! PLEASE DO ALL, THANK YOU. Exercise 1 Write
PLEASE ANSWER ALL 3 EXERCISES!!!!!!! THANK YOU.I NEED A SOLUTION TO EXERCISE 1, 2, AND 3!!! PLEASE DO ALL, THANK YOU.
Exercise 1 Write a Matlab function that implements the Thomas algorithm to solve tridiagonal linear systems of equations in the form a1 c00 0 0 bi T2 In-1 00-1 The function should be in the form function x-tridiag. solver (e,a,c,b) Input Output x: solution to the lincar system (1) (column vector) Exercise 2 Consider the system of nonlinear ordinary differential equations y(0)- where f : R" x [0,TR",y: [0,TR. Write a Matlab function that solves the system (2) by using the third-order Adams-Bashforth scheme. To start-up the scheme (first two steps) use the Heun scheme. The function should be of the form function y,t AB3(fun, yo,T,DT,IOSTEP) Input fun: function handle representing f(y,t) y0: column vector representing the initial condition T: period of integration DT: time step IOSTEP: Input/output step. The solution is saved in the output matrix y every IOSTEP steps. Output: y: nx S matrix collecting the time snapshots of the solution to (2). Note that the total number of snapshots S (including the initial condition) is floor (T/(IOSTEP.DT))1 t: vector collecting the time instants at which the solution is saved in the output matrix y Exercise 1 Write a Matlab function that implements the Thomas algorithm to solve tridiagonal linear systems of equations in the form a1 c00 0 0 bi T2 In-1 00-1 The function should be in the form function x-tridiag. solver (e,a,c,b) Input Output x: solution to the lincar system (1) (column vector) Exercise 2 Consider the system of nonlinear ordinary differential equations y(0)- where f : R" x [0,TR",y: [0,TR. Write a Matlab function that solves the system (2) by using the third-order Adams-Bashforth scheme. To start-up the scheme (first two steps) use the Heun scheme. The function should be of the form function y,t AB3(fun, yo,T,DT,IOSTEP) Input fun: function handle representing f(y,t) y0: column vector representing the initial condition T: period of integration DT: time step IOSTEP: Input/output step. The solution is saved in the output matrix y every IOSTEP steps. Output: y: nx S matrix collecting the time snapshots of the solution to (2). Note that the total number of snapshots S (including the initial condition) is floor (T/(IOSTEP.DT))1 t: vector collecting the time instants at which the solution is saved in the output matrix yStep 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