Loading...
題目f(x)=-2x^4+3x^3+2x^2-x+5=0 程式碼clear all z=-2:0.01:1 A=unidrnd(5)-3 x=A p=[1,3,2,-1,5] y=polyval(p,z) q=polyder(p) r = roots(p) for i=1:10000 y1=polyval(q,x) x1=x-y1/1000 %%1000這個數當作步伐 x=x1 end ...