How to store a trained Random Forest model in python or matlab as a matrix
Not sure about a matrix, but here's a repo for porting sklearn models into other languages, including C. 

https://github.com/nok/sklearn-porter