Nonlinear and learning control of a one-dimensional magnetic manipulator