Here is a quick youtube video to demonstrate the code that I have been using to stream accelerometer data to matlab. The basic structure of the code is all referenced from the MatlabArduino youtube videos. There are several videos that explain how it all works and is a great reference.
Note, I am using the Adafruit BNO055 IMU sensor to capture acceleration data, so you may need to adjust this accordingly for you setup. Also, the communication protocol is slightly different if you are using an Xbee or just the arduino for serial communication. Again, see the MatlabArduino videos for better instructions. My matlab and arduino code can be found at the below link.
It is still a work in progress (no disclaimer about the quality or performance of the code) but just wanted to share in case anyone was interested. I’m wrapping up a Masters in mechanical engineering over the next month, so once that is done I will try to get this up onto Github sometime in the summer.