Guide on Accelstepper

Here's a link to the AccelStepper.h file that MarkT mentioned:
www.airspayce.com/mikem/arduino/AccelStepper/AccelStepper_8h_source.html
Scroll down to around line 300. This is where the descriptions start for the functions that the library makes available.

Time for me to call it a night. But if the topic is still alive when I get a chance to log in tomorrow, I imagine I will ask for more specific details about what you want to do.
In the library, acceleration and deceleration appear to come into play as the motor is asked to move to a position--accelerating from start and decelerating to stop. Changing speed while running may be more a matter of incrementing or decrementing a speed variable.

--Michael