Hi!
Edinburgh does get very cold but we also have very changeable weather throughout the day, especially in Spring and Autumn. It's a good idea to wear light layers so you can take some off if it gets a little warmer, so getting a raincoat that will also work as a light jacket might be a good idea. Things like a thin fleece or tops that you can layer together will be useful. A good winter coat will still be pretty essential though since you'll be here in January and February. I hope that's helped a little bit!