Controlling the speed of a dc motor?

Yes, that is exactly the same but without the direction control and without potentiometer.
Be sure to get all polarities correct and also be sure you have the right components.
If you do not hve the exact same components as described in those schematics (either one of them), report back here to ask about differences.
Ofcourse you will have to tell us what parts you do have.