This paper presents an approach to control design for flexible structures based on the transfer matrix method (TMM). The approach optimizes the closed-loop pole locations while working directly on the infinite-dimensional TMM model. The approach avoids spatial discretization, eliminating the possibility of modal spillover. The design strategy is based on an iterative process of optimizing the closed-loop pole locations using a Nelder-Mead simplex algorithm and then performing hardware-in-the-loop experiments to see how the pole locations are affecting the closed-loop step response. The evolution of the cost function used to optimized the pole locations is discussed. Contour plots (three dimensional Bode plots) in the complex s-plane are used to visualize the pole locations. A computationally efficient methodology for finding the closed-loop pole locations during the optimization is presented. The technique is applied to a single-flexible-link robot and experimental results show that the optimization procedure improves upon an initial, Bode-based compensator design, leading to a lower settling time.