I understand the premise of this problem. We just learned how to use fminbnd, and for this problem in particular the clear path ahead is to define an anonymous function V = @(h) such that V is the volume of the solid and h is our input height. Using the negative volume we can use fminbnd to find the max volume as well as the value of h needed to output it.
I came up with V = @(h) -120*(70*h + 35^2)
(70*h is the area of the rectangular face without the triangle, 35^2 is the area of the triangle
At this point something is fishy. h is clearly unbounded with my (supposedly) incorrect formula for volume. I am staring at this solid and picturing h increasing to infinity and I don't see how this is even an optimization problem. The volume appears to increase indefinitely as h does.
edit: I see now that I was thinking about the problem incorrectly. I thought the top width was fixed at 70 in.…