Oleh :
a. Bias Maju
for i=1:N
f1=180/pi*fungsi1 (x1+dx); %f(x+dx)
f2=180/pi*fungsi1 (x1) ; %f(x)
%Turunan dari fx:
fx(i)=(f1-f2)/dx;
x(i)=x1;
x1=x1+dx;
end
%plot(x,fx)
plot(x,fx,'o',x,exp (-a.*x).*(cos(x*pi/180)-
a.*sin(x*pi/180)),'*')
for i=1:N
f1=fungsi2(x1); %f(x+dx)
f2=fungsi2(x1-dx); %f(x)
%Turunan dari fx:
fx(i)=(f1-f2)/dx;
x(i)=x1;
x1=x1+dx;
end
%plot(x,fx)
plot(x,fx,'o',x,(6.*x.^5)+(3.*x.^2),'*')
for i=1:N
f1=fungsi5(x1); %f(x+dx)
f2=fungsi5(x1-dx); %f(x)
%Turunan dari fx:
fx(i)=(f1-f2)/2*dx;
x(i)=x1;
x1=x1+dx;
end
%plot(x,fx)
plot(x,fx,'o',x,(6.*x.^5)+(3.*x.^2),'*')