How to run MATLAB code from Java?

后端 未结 5 1812
自闭症患者
自闭症患者 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:30

    I have used Java Builder for running matlab scripts/functions in java application, and it seems to be very easy and helpful.

    For this purpose, you need to have Java Builder JA toolbox to deploye matlab script/function as java class.

    You then need to add the (converted) java class in to your java project library, and additionally the javabuilder jar file.

    After doing the above steps you can easily run the matlab script (which is now a java class in the project library) just by calling the class name in the code. If the class is a matlab function, you can pass the paramenters and get the return values easily.

    But offcourse, it is not the only method to do it. But this one seems easy to me comparatively.

    I hope this answers to your question.

提交回复
热议问题