Why am I getting an error while using intlinprog
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
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 个评论
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 Center 和 File Exchange 中查找有关 Nonlinear Control 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!