Regarding the inequalities questions here's one example
t=-10:0.01:10; %values on x axes
f=t.^2-2; %values on y axes, put your function here
mif=1;maf=2; %select minimum and maximum value (y axes)
cla
axis([-10 10 -10 10])
hold on
line(xlim,[mif mif],'LineStyle','--','Color','k')
line(xlim,[maf maf],'LineStyle','--','Color','g')
idx=f>mif & f<maf; %select the index values of f that satisfy the conditions
plot(t,f) %plot the function
fill(t(idx),f(idx),'r') %fill the area that's inside the conditions
legend('maximum','minimum','function','area')
Regarding the triangles, maybe this
s1=2;s2=3;s3=2; %each side length
a1=40; %one angle in degrees
if all([s1+s2>s3,s3+s2>s1,s1+s3>s2])
cla;axis([-4 4 -4 4]);hold on
line([0 s1],[0 0])
line([0 s2*cosd(a1)],[0 s2*sind(a1)])
line([s2*cosd(a1) s1],[s2*sind(a1) 0])
grid on
else
disp('the lengths don''t make a triangle')
end
