在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
% a quick demo of Horner's method and its effects clear all close all % first a comparison of ways to compute x = 0.988:.0001:1.012; y1 = x.^7-7*x.^6+21*x.^5-35*x.^4+35*x.^3-21*x.^2+7*x-1; plot(x,y1,'r--') pause % because this polynomial can be nicely factored ... y2 = (x-1).^7; plot(x,y2) pause % now let's see Horner's method y3=-1+x.*(7+x.*(-21+x.*(35+x.*(-35+x.*(21+x.*(-7+x)))))); plot(x,y3) pause % now for the head-to-head comparison plot(x,y1,'r--',x,y3) |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论