Q:

How to power a device using a USB port instead of AA batteries?

I have a device that uses 3 AA batteries and I would like to power it from a USB port instead.
As I understand I will have to use resistors but I have no idea on which ones.
I have found the following calculator: Voltage Divider Calculator
While it does its work, the wiring shown in diagram is quite confusing:

I guess this is some logical schema rather than real wiring schema.
Question:
What resistor values do I need to get ~3.6V from a 5V USB port, and how should I wire them ?
Is there a better way than using resistors to get 3.6V from 5V?

A:

Resistors will not be the best option, you need to know the source current of the device and there will be large voltage swings if the device changes it's current. Resistors may also not be possible if the device draws large amounts of current.
Three alkaline batteries is lower than 4.5V (could be as low as 3.6V when their dead). Since the device running from 3 alkaline batteries should be able to accept 4.5V, a voltage regulator like the might be a good way to ensure that the device is getting the appropriate voltage, however you might need to select one with a lower dropout than 0.5V which might be hard if your device needs more than 100mA.
Another option would be to find out if the device already has a linear regulator or switching regulator on the input. If it does, then you might be able to run 5V straight into the device. 

