필터 지우기
필터 지우기

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

채택된 답변

Jatin Waghela
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개)

카테고리

Help CenterFile Exchange에서 Java Package Integration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by