You cannot extract any "function" from a spline. At least, if you did, it would not be anything you could read or type without many, many coefficients, that you problably would not find useful.
In order to build an approximation using a sum of sin and cosine terms, you will usually use a tool like the curve fitting toolbox, but the optimization or stats toolbox can also do nicely. you can also do it without any such toolbox, but it wil take more effort. So knowing what you have would be important. Also, it would greatly help to have your data.