using deploytool when the function uses another function in a classfolder

조회 수: 2 (최근 30일)
Dail
Dail 2016년 10월 28일
편집: Dail 2016년 10월 29일
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!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by