如何Matlab的code库与Android整合? [英] How to integrate Matlab code library with Android?

查看:221
本文介绍了如何Matlab的code库与Android整合?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个算法和其他一些code这是在MATLAB和我想用它在我的Andr​​oid应用程序。

I have an algorithm and some other code which is in MATLAB and I want to use it in my Android application.

我怎样才能做到这一点?

How can I do this?

  • 我可以做一个jar文件从MATLAB与Android的使用?
  • 我必须做点别的?

推荐答案

如果您还有其他的产品, MATLAB生成器JA的Java ,您可以从MATLAB code产生一个​​.jar文件。

If you have an additional product, MATLAB Builder JA for Java, you can produce a .jar file from your MATLAB code.

然而,.jar文件需要MATLAB编译器运行时(也就是说你用MATLAB编译器和MATLAB生成器产品可自由可再发行组件)是present。该MCR有一个更大的体积比适用于典型的Andr​​oid设备(它像MATLAB本身的副本,没有用户界面)。

However, the .jar file requires the MATLAB Compiler Runtime (a freely redistributable component that you get with MATLAB Compiler and MATLAB Builder products) to be present. The MCR has a much larger footprint than is suitable for the typical Android device (it's like a copy of MATLAB itself, without the user interface).

您能想到的任何

  1. 运行您的MATLAB的.jar一个服务器上远程文件,并让你的Andr​​oid应用程序连接到它,或者
  2. 在使用MATLAB编译器和生成器产品来代替,使用 MATLAB codeR ,该将MATLAB语言的子集直接转换为C code。这个C code不需要MCR,并可以直接编译在Android上运行。请确保您的MATLAB算法落在,或者可以pssed在EX $ P $,在MATLAB语言的合适子集。
  1. Running your MATLAB .jar file remotely on a server, and having your Android application connect to it, or
  2. Instead of using MATLAB Compiler and Builder products, use MATLAB Coder, which will convert a subset of the MATLAB language directly into C code. This C code doesn't require the MCR, and could be compiled to run directly on Android. Make sure your MATLAB algorithm falls within, or can be expressed in, the appropriate subset of the MATLAB language.

这篇关于如何Matlab的code库与Android整合?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆