필터 지우기
필터 지우기

Why am I getting an error while using intlinprog

조회 수: 2 (최근 30일)
Bhavz
Bhavz 2014년 10월 14일
댓글: Sean de Wolski 2014년 10월 15일
Please see my file attached after running it I get the following error
Error using intlinprog (line 121) INTLINPROG requires the following inputs to be of data type double: 'f'.
Error in main (line 111) [x,fval,exitflag] = intlinprog(@objectiveFun,...
Please do let me know whats wrong with my code and what can i do so that it works and i get a finite number of iterations and plot them as well.

채택된 답변

Sean de Wolski
Sean de Wolski 2014년 10월 14일
IntCon is a function handle. It cannot be. It has to be a vector showing which elements are integer constrained. For example:
[1 2 4]
or
1:n
  댓글 수: 2
Bhavz
Bhavz 2014년 10월 14일
^ many thanks for yr reply so where and how should i place my constraint as an input ?
Sean de Wolski
Sean de Wolski 2014년 10월 15일
It's not where do you place it, it's what type is it. You need to extract from your constraint function, (or somewhere else), which elements are integer constrained.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by