How to run Matlab code on an Android device?

user1173564 picture user1173564 · Jan 27, 2012 · Viewed 12k times · Source

I would like to run Matlab code on an Android device. There is the JAVA Builder in Matlab, which can create Java classes from the M-Files. But it requires a MatlabRunTime to be installed on the target machine. I use Matlab on Windows, so the JAVA Builder creates a MatlabRunTime as *.

Is there a way to run M-Files on an Android Smartphone?

Answer

Sam Roberts picture Sam Roberts · Jan 27, 2012

It's not possible to use any of the deployment products (including MATLAB Compiler and MATLAB Builder for Java) to run MATLAB code on Android. The deployed components you get from any of those products depend on the MATLAB Compiler Runtime, which has a much larger footprint than an Android device could handle.

You could consider either

  1. Writing an app that connects, as @Oli suggested, to MATLAB code (or deployed MATLAB code) running somewhere on a server
  2. Using MATLAB Coder, which can convert a subset of the MATLAB language into C code that could be integrated into your app.