% Zilinskas' Function # 3 
% Ranges of initial points: 0 <= x <= 20 , 0 <= x <= 50 or 0 <= x <= 100
% Many global minimum happen at: x=(3*pi/2 + 2*pi*n) , n=0,1,2,3,...
% >> (2 for the 1st range, 8 for the 2nd range and 16 for the 3rd range) 
% f(x)=-1
% Coded by: Ali R. Alroomi | Last Update: 26 Jan. 2015 | www.al-roomi.org
clear
clc
warning off
 
xmin=0;
xmax=100;
R=100000; % steps resolution
x=xmin:(xmax-xmin)/R:xmax;
    
for i=1:length(x)
    f(i)=sin(x(i));
end
 
plot(x,f,'r','LineWidth',2);grid;set(gca,'FontSize',12);
xlabel('x','FontName','Times','FontSize',20,'FontAngle','italic');
ylabel('f(x)','FontName','Times','FontSize',20,'FontAngle','italic');