⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex6_6.m

📁 Advanced Engineering Mathematics using MATLAB by Harman, Dabney, Richert,书中全部源码
💻 M
字号:
% EX6_6.M Taylor series example% Calculate error in Taylor series expansion (6 terms) of exp(x)format longx=1.0yexact=exp(1)nfact=5*4*3*2*1;yseries=1+x+(x^2)/2+(x^3)/(3*2)+(x^4)/(4*3*2) +(x^5)/(nfact)fprintf('Error in 6 term Taylor series for exp(1) \n')yerror=abs(yexact-yseries)errbound=yexact*(1/(6*nfact))%% Modify the script to allow input of variable x and the %  number of terms in the series. Then, test the error as%  a function of x and n. Try the symbolic command taylor 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -