How would I write an input Lammps command for continuous change in temperature?
(Disclosure: I'm not a LAMMPS user, but I've used other MD packages.)

You'll probably want to use one of the thermostat settings such as the Nose-Hoover type described here in the LAMMPS documentation, but there's a more general HowTo guide on temperature control and calculation in the docs as well that looks pretty useful.

I would strongly recommend reading the sections of the manual concerning any given thermostat type you're going to use fully before running serious calculations with it, though, since there are some things to look out for, such as the tendency for setting the thermostat interval too low to cause large oscillations in effective temperature.

The Nose-Hoover type (and some of the others, but I only took a quick look) also lets you step up or down the temperature with a given interval. Depending on exactly what type of thermal expansion you're looking at, I'd just like to note: you really need to set the stepping interval appropriately to let the structure equilibrate at each temperature you want to look at, otherwise your results won't be meaningful. (Or, at least, won't have the meaning that you might want.) Relatedly, I'd also suggest that if you weren't planning to already, you run each simulation both ways: one stepping the temperature up, and one bringing the temperature down. If the behaviour matches at the temperature steps in each, you can be relatively confident that you've given the structure enough time at each temperature.