MATLAB Answers

User-defined Matalab function call from Java fails

1 view (last 30 days)
Ercan Atam
Ercan Atam on 16 Sep 2019
When I call the attached function "optimal_sizing_ga.m" from Java it does not work.
For example, the following call fails: optimal_sizing_ga(200,3,75,8,0.3)
This function works in Matlab but fails when called from Java.
Any help is appreciated.

  0 Comments

Sign in to comment.

Answers (1)

Hari Krishna Ravuri
Hari Krishna Ravuri on 6 Jan 2020
Edited: Hari Krishna Ravuri on 6 Jan 2020
I understand that, you want to execute user defined MATLAB functions in Java. This can be done by using MatlabEngine feval and fevalAsync methods. Please refer https://in.mathworks.com/help/matlab/matlab_external/execute-matlab-functions-from-java.html to know about executing MATLAB Functions from Java. Please refer https://in.mathworks.com/matlabcentral/answers/355278-calling-user-defined-script-from-java to know about executing a MATLAB Script from Java.
Hope this helps!

  0 Comments

Sign in to comment.

Sign in to answer this question.


Translated by