How can I call cplex from matlab? And what versions of matlab and cplex should I have inorder to do so?

 채택된 답변

yekdane  khattara
yekdane khattara 2013년 12월 21일
편집: Walter Roberson 2018년 5월 28일

1 개 추천

add the path who you are installed cplex
>> addpath ('C:\Program Files\IBM\ILOG\CPLEX_Studio_Academic123\cplex\matlab\x64_win64')
and save the path
>>savepath
and same way for running the examples
>>addpath ('C:\Program Files\IBM\ILOG\CPLEX_Studio_Academic123\cplex\examples\src\matlab')
>>savepath

댓글 수: 3

Del
Del 2014년 1월 3일
편집: Del 2014년 1월 3일
I have the same issue, I tried adding the path and saving it, but it does not work. This is what I am getting:
>>addpath C:\Program Files\IBM\ILOG\CPLEX_Studio126\cplex\matlab\x64_win64
Warning: Name is nonexistent or not a directory: C:\Program
> In path at 110
In addpath at 87
Warning: Name is nonexistent or not a directory:
Files\IBM\ILOG\CPLEX_Studio126\cplex\matlab\x64_win64
> In path at 110
In addpath at 87
When I type in >>cplexlpex, I am getting the error:
Undefined function or variable 'cplexoptimset'.
I am not sure what is wrong here.
Del
Del 2014년 1월 3일
편집: Walter Roberson 2017년 12월 24일
Never mind! I used
>>addpath(' C:\Program Files\IBM\ILOG\CPLEX_Studio126\cplex\matlab\x64_win64')
instead of
>>addpath C:\Program Files\IBM\ILOG\CPLEX_Studio126\cplex\matlab\x64_win64
and everything worked perfectly fine :)
Priya Ranganathan
Priya Ranganathan 2017년 12월 24일
Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Khyathi Mishra
Khyathi Mishra 2021년 4월 4일

0 개 추천

You must have IBM CPLEX OPTIMIZATION STUDIO 12.10 version
the versions released after that doesnt have files related to interfacing matlab with cplex.

댓글 수: 1

Pavan chandra Mandava
Pavan chandra Mandava 2021년 7월 11일
Do you know which version of matlab is compatible with Cplex 12.10 Thhank you

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by