Variable Voltage

Can anybody please recommend a variable voltage regulator that I can purchase to test out variable voltages when building an electromagnet?