Question: Using this function code: function [ sum ] = Taylor ( x , n ) sum = 0 ; for i = 0 : n
![Using this function code: function [sum] = Taylor(x, n) sum =](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f312f5c4f6c_13366f312f55e7d4.jpg)
Using this function code:
function [sum] = Taylor(x, n)
sum = 0;
for i = 0 : n
sum = sum + ( i ^ i ) / factorial(i);
end
end
Example 2: Write a Matlab script that uses the function in Example 1 to plot the abs. relative error in the Taylor series approximation T- for n=4, 8, 16, and 20 across X E [-1,1] for 50 values of X. k! Matlab functions to use: "subplot", "semilogy", etc
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
