Hi Amani,
You can use Simulink Android Support package to achieve this. Embed Your MATLAB code in MATLAB function block, use ToApp Block of Andorid Support Package. Deploy the model and Import to Android Studio and modify the code accordingly.
Check the below examples for more info
https://www.mathworks.com/help/supportpkg/android/ref/control-lego-mindstorms-ev3-robot-using-android-device.html - for function block
https://www.mathworks.com/help/supportpkg/android/ref/enhanced-color-replacement-with-customized-code.html - to add custom code using ToApp Block