clear all

x1=0:0.01:2;
x2=2:0.001:3;
x3=3:1:10;
x4=10:2:2000;
%a=4;
%b=-3;
% Anrop till funktionen
[f1,min1,max1]=u3_fun(x1);
[f2,min2,max2]=u3_fun(x2);
[f3,min3,max3]=u3_fun(x3);
[f4,min4,max4]=u3_fun(x4);



figure(88)
% Kommandot subplot delar in ett figure fonster i delar. 
% Har 2 x 2 delar 
subplot(2,2,1)
plot(x1,f1,'LineWidth',2) 
title(['max = ' num2str(max1) ' och min = ' num2str(min1)])
subplot(2,2,2)
plot(x2,f2,'LineWidth',2)
title(['max = ' num2str(max2) ' och min = ' num2str(min2)])
subplot(2,2,3)
plot(x3,f3,'LineWidth',2)
title(['max = ' num2str(max3) ' och min = ' num2str(min3)])
subplot(2,2,4)
plot(x4,f4,'LineWidth',2)
title(['max = ' num2str(max4) ' och min = ' num2str(min4)])


