How to run MATLAB code from Java?

后端 未结 5 1816
自闭症患者
自闭症患者 2020-12-19 12:01

I am facing problem in running MATLAB code from Java. If you know something on this, could u please help me out?

5条回答
  •  甜味超标
    2020-12-19 12:33

    There are 2 ways for doing this :

    1. Use the Matlab Engine which has a C interface (see the link of the first answer for that). It is mandatory to have Matlab installed on all the machines on which you want to run this (see Matlab license for details)
    2. Use the Matlab Builder for Java which compiles the matlab code and produce a Java interface of your functions directly. With this solution, you need to by the Matlab compiler and the Matlab Builder for Java but you can then deploy your solution without paying anything more. Note that you must install the Matlab Compiler Runtime (MCR) on each machine but this is free.

提交回复
热议问题