What is the primary function of a solenoid in electrical and mechanical systems?
a) To convert electrical energy into mechanical motion
b) To store electrical energy for later use
c) To measure electrical resistance
d) To filter out unwanted electrical noise