MATLAB Answers

How to embedding a matlab exe file in android studio? or an alternative to android studio.

4 views (last 30 days)
Layla scbenski
Layla scbenski on 21 Oct 2020
Commented: Walter Roberson on 23 Oct 2020
I have a matlab code that I want to generate an exe file out of ,then embedd it into my android studio application, however I have read that embedding a matlab exe file into android studio is not possibe is that true? and if it is what can I do ? what other IDEA software can I use in which I am able to embed a matlab exe file in. Or is there a way i can convert my matlab code into some other language that android studio would be able to interpret.
Please don't hesitate with any suggestion or idea or observation you have.
Thank you in advance.
  4 Comments
Walter Roberson
Walter Roberson on 23 Oct 2020
There is no present solution for embedding MATLAB graphics on Android.
The closest you can get is to use Computer Vision Toolbox to draw lines and words into an image and present the image.
We could perhaps be more specific about possibilities if you talked about what functionality the application would have to have.

Sign in to comment.

Answers (2)

Walter Roberson
Walter Roberson on 21 Oct 2020
Edited: Walter Roberson on 21 Oct 2020
It is true.
.exe are in machine language for Intel or AMD x64 systems, but Android phones nearly all use ARM architecture. Also, Android was derived from Linux not Windows.
You can use MATLAB Coder to generate C or C++ code for a subset of MATLAB. The subset does not support graphics.

Sutanu Maiti
Sutanu Maiti on 22 Oct 2020
You can achieve this by using Simulink support package for Android Devices.
There is also an example Detect Boundaries of Objects Within Video Using MATLAB Function Block on Android Device that describes how to write MATLAB code that generates code and deploys on Android device.
Once generated app code is exported to Android Studio, you can modify the Java/xml code (in Android Studio) and run on device (from Android Studio). It will run the Simulink generated Algorithm also under the hood.
  1 Comment
Walter Roberson
Walter Roberson on 22 Oct 2020
Android does not use exe files and the user specifically wants to use exe files for the first part of the question.
For the second part of the question, Simulink models cannot really run MATLAB code: they need a restricted and augmented MATLAB-like language. Sometimes the conversion is easy, sometimes it is difficult. Graphics in particular are quite different.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!