Thomas Fischl writes:
Some applications needs to control the output voltage of a dc/dc converter instead using a fixed output voltage. For example battery chargers has to adjust the output voltage to the current battery level. This page shows how to add such a control function to a buck converter circuit.
Control output via external voltage source
Typically a voltage divider is used in dc converters to adjust the output voltage to the needed feedback voltage. To control the feedback signal by an external voltage source, a third resistor is added to the circuit.
More info at Fischl’s site.