Java runtime error because of SYMS variables..

1 view (last 30 days)
Hello,
I have a functions follow as
function[out1,out2,..]=myProject(in1,in2,in3...)
....
syms Hs Ht; // HERE LİNE 21
CT=C0*(C1+C2*((1/Hs)+(1/Ht)+C3))+C7*(Hs^4.1+((Hs^5.1)/Ht)+C3*(Hs^5.1))+C8*(((Ht^3.5)/Hs)+(Ht^2.5)+C3*(Ht^3.5));
F1=diff(CT,Hs);
F2=diff(CT,Ht);
....
end
after that I used this function in my java program.
MyMatlabClass myObj = new MyMatlabClass();
outObj=myObj.MyProject(27,in1,in2,in3,...);
everything as great as here.But when program run i took a error as follows..
Error in MyProject (line:21)
:S Actually i do not understand Why program has failed? I'm waiting your solutions..
Thanks..
  2 Comments
Jan
Jan on 12 Feb 2013
Edited: Jan on 12 Feb 2013
Is this the complete error message? Usually error message do not contain only the line number, but some descritpions also.
Which is the line 21?
Emre
Emre on 12 Feb 2013
Firstly Thanks for interested.Yes This error message when program run i took from Netbeans. by the way I specified up
syms Hs Ht; // HERE LİNE 21

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 12 Feb 2013
From java... Is this using the Java Builder project? If so then the problem is that the symbolic toolbox cannot be compiled, and so cannot be used from the NET Builder or JAVA Builder products.
  12 Comments
Malcolm Lidierth
Malcolm Lidierth on 15 Feb 2013
Emre "creating a new session every time" - I'm rusty on matlabcontrol, but I recall that is programmer-selectable.
Emre
Emre on 15 Feb 2013
Edited: Emre on 15 Feb 2013
i fixed this problem but i have trouble again. this time I'm using existing proxy but I want to close matlab window when I finish my program and also i want to hide matlab window when main java program begin.. I know Iwant alot.. :) but other way it does not look pleasing to the eye..

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!