Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please show all work for parts 1-3 Use your own MATLAB codes to calculate an exponential of a square matrix A, .e. e Task 1:
Please show all work for parts 1-3
Use your own MATLAB codes to calculate an exponential of a square matrix A, .e. e Task 1: Based on the following infinite series: Compared to the regular function 1! 2! 1! 2! n! Write an MATLAB function to calculate an N-term approximation of e using the first N-terms in the infinite series (In the program you may either directly use the MATLAB operator of * i.e C=A*B or use your own codes for matrix multiplication. The latter is encouraged as an excise for developing programming skills) Task 2: Write a function to calculate i=1 j=1 i.e. the sum of absolute values of all entries (or elements) of the n Xn square matrix A. The quantity can be used to assess convergence of an infinite series Task 3: Convergence study: Assume: 1 0 0 A-0 20 Use your user-defined functions to calculate the approximate value of eA up a prescribed error tolerance, say, 10-8 Error definition Define approxiame where the exact value is directly from the MATLAB function, i.e. expm(A) and the approximate value is from your N-term approximation. The error is defined as the sum of the absolute values of all entries of i=1 j=1 And so the convergence criterion becomes Also, plot a cure to show how the error, depends on N, the number of terms used in the approximation and determine the minimum number of terms should be used in order to achieve the desired accuracyStep 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