N = 200;
x = linspace(-5,5,N);
y = 1./(1 + (x .* sin(x)).^2);
axis([-5,5,0,1.5]);
plot(x,y,"-;T;")
grid();
set (gca(), "defaultlinecolor", "red");
l1=line([-pi,-1.8],[1.05,1.28])
l2=line([pi,1.8],[1.05,1.28])
xlabel("X coordinate [m]")
ylabel("temperature T [K]")
title("Temperature distribution")
text(0, 1.3, "Characteristic points", "fontsize", 12, "horizontalalignment", "center")
replot
print("temp_dist.fig", "-color", "-F:20");
print("temp_dist.png", "-color", "-r0");
pause()
