Receive sensor data and camera images from MATLAB® Mobile™ directly into Simulink®.
The MATLAB Mobile Receiver block lets you stream live data from a mobile device running MATLAB Mobile into your Simulink model. This includes:
- Built-in sensors:
- Acceleration
- Orientation
- Angular Velocity
- Magnetic Field
- GPS
- Camera images (RGB frames)
This enables rapid prototyping, algorithm testing, and interactive simulations using real-world mobile data.
- Install MATLAB Mobile on your mobile device.
- Install MATLAB Support Package for Android Sensors or MATLAB Support Package for Apple iOS Sensors from the Add-On Explorer
On the device, inside MATLAB Mobile:
- Go to Sensors > Stream to and select MATLAB.
- Enable
- Sensor Access -> Sensors > More > Sensor Access
- Camera Access
- (Optional) On Android, enable Background Data Acquisition to allow streaming while the app runs in the background.
- Open
MATLABMobileReceiver.prjin MATLAB. - Open
MATLABMobileReceiverExample.slx. - Run the Simulink model.
In the block dialog, enable the outputs you want to stream:
- Acceleration outputs device acceleration as
[X Y Z]. - Orientation outputs device orientation as
[Azimuth Pitch Roll]. - Angular Velocity outputs angular velocity as
[X Y Z]. - Position outputs GPS position as
[Latitude Longitude Altitude]. - Magnetic Field outputs magnetic field as
[X Y Z]. - Camera outputs RGB camera frames from the selected front or back camera.
Set Frequency to control the sensor sample rate in Hz. Set FPS to control the camera frame rate, or set FPS to 0 to expose an external Shoot input that captures a frame when triggered.
Requires MATLAB release R2026a or newer and:
