How can I convert Matlab code into an android?

3 次查看(过去 30 天)
I need step by step procedure to convert matlab code to android...

回答(2 个)

Image Analyst
Image Analyst 2015-9-14
You're in luck! There is a webinar on this tomorrow, so act quickly. Go here to register: Register for MATLAB to Android webinar

Walter Roberson
Walter Roberson 2015-9-10
The MATLAB Compiler product and the MATLAB Compiler SDK product are both not suitable for this purpose.
You need the MATLAB Coder product, to generate C or C++ code that you would then compile using a development environment for Android.
MATLAB Coder is an expensive product that is available for Academic and Professional / Commercial licenses, but not for Student Version or Home licenses.
There are quite a number of parts of MATLAB for which code cannot be generated. In particular, most graphics interactions cannot have code generated. There are some kinds of graphics that can have code generated, operations written in terms of what Mathworks refers to as System Objects. The Computer Vision Toolkit has a number of such operations. System Objects may have code defined for some targets but not for others, as graphics and I/O are hardware dependent. You might have to write some custom drivers for use with Android.
Generally speaking, MATLAB Coder only "easily" generates code for operations that are well defined in the C Standard Library, 1990 edition. If it something that you could not write a portable C program for, with no operating system interaction beyond fopen/fgetl and the like, then MATLAB Coder either cannot generate code for it or else will require that you generate customized drivers for it for use on Android.
This topic is far too large to give a step-by-step description of.
  2 个评论
Marcxiya Palani
Marcxiya Palani 2015-9-14
Using opencv is there any possibility to convert matlab code into an android? If yes means could you explain the procedure to convert matlab into android.
Walter Roberson
Walter Roberson 2015-9-14
opencv does not provide any tools to convert MATLAB for use on Android.
If you were to alter your MATLAB program to call opencv routines instead of MATLAB graphical routines, and you were to alter your MATLAB program so that it only used the portion of MATLAB that can have code generated for it, then you could use the MATLAB Coder product to generate C or C++ code that had calls to opencv(), and you could then use an Android development environment and link against OpenCV4Android
When I say "alter your MATLAB program", I mean a programmer who understood MATLAB and understood OpenCV would need to rewrite portions of the code. There is no tool for this. Depending on your code, it could take anywhere from an hour to several years of effort by a programmer.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Setup and Configuration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by