Arduino and Matlab

Hey everyone,
I have a problem with my project, I want my arduino to process my encoder data and have a final value of dis (displacement), and my Matlab to process my kinect Data and have a final value of phi, then I want to use the both values together.

here is my problem,

How should I send data from my arduino to matlab noting that I want them both process separately?

please help me.

best regards

Ahmad

2 main ways

1 - Install the matlab for arduino app. Essentially hijacks the arduino and allows you to program it with matlab code.

2 - Serial communication. Use print and println commands to send data to matlab just like you send it to the serial monitor. On the matlab side use fopen; serial('COM'); fget etc to fetch data from the port.