how to send the value of a Java variable to a matlab variable when the matlab session is accessed in Java?
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I am using " matlab.engine.shareEngine" concept for accessing matlab in Java.
I wanted to know how to send/assign the value of a java variable to a matlab variable.
for example:
int i=4;
Future<Void> vFuture = eng.evalAsync("x=i;");
I also tried eng.feval("x",i);
but it is giving the following error:
Undefined function or variable 'x'.
Please help me regarding which function do we need to use?
Thanks & Regards,
Shruthi Ramakumar
0 个评论
采纳的回答
Jatin Waghela
2017-10-2
Please refer to the below documentation link which gives more information and examples:
MATLAB API for Java:
and
Pass variables from Java to MATLAB:
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call Java from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!