using deploytool when the function uses another function in a classfolder

5 visualizzazioni (ultimi 30 giorni)
I had a simple optimization problem for test. I used Yalmip to build this test problem like this
function a=test(lowerlimit,upperlimit)
x=sdpvar(1,1);%sdpvar is a Yalmip function to define decision variables
H=5*x^2-17*x+10;%this is the objective function
F=(lowerlimit<=x<=upperlimit);%this is the constraint
tic
aaa=solvesdp(F,H,sdpsettings('solver','GUROBI'));%I solve this problem with Gurobi, solvesdp is a Yalmip function
toc
a=double(x)
end
This function works well in Matlab R2012a, and I used deploytool to package this function to a java class, it succeeded. However, when I run this java class in IDEbeans, here comes the error:
  • Undefined function 'yalmip' for input arguments of type 'char'.
  • Error in sdpvar (line 508)
  • Error in test (line 2)
  • Exception: com.mathworks.toolbox.javabuilder.MWException: Undefined function 'yalmip' for input arguments of type 'char'.
After seaching for this through the internet, I can almost make sure that this is due to the fact that the Yalmip function sdpvar is located in a class folder
However I am not very sure how to solve this. I also find some similar questions like this http://cn.mathworks.com/matlabcentral/answers/165412-using-deploytool-with-classdef-and-private-functions
Could anyone help me out ?
Thanks you guys very much!

Risposte (0)

Categorie

Scopri di più su Deep Learning Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by