How can I solve the error "Subscripted assignment dimension mismatch."when solving a MOOP using the gamultiobj of the matlab toolbox
1 次查看(过去 30 天)
显示 更早的评论
Dear all;
I am trying to solve a MOOP using the Matlab global optimization toolbox. some of the parameters used in the objective functions are learned from table loaded from an excel file. when I run the code from the optimization toolbox it gives me an error "Subscripted assignment dimension mismatch." Please someone can help me about this. you can find attached the code.
2 个评论
Walter Roberson
2016-5-18
We need some sample data (P) and the .xlsx file to test with, and we need a complete copy of the error message.
回答(1 个)
Matt Cohen
2016-5-19
Hi Sobhi,
Thank you for providing the data and fitness function for reproducing this issue. One issue I am encountering right away when running this is that your fitness function currently returns a 2x2 matrix. Because of this, I am receiving the following error:
"Error running optimization. Your fitness function must return a scalar value."
In order to get this to eventually work, you will need to modify your fitness function so that it returns a scalar value instead of a matrix. I do not know more about the specific problem or fitness function you are working with, so I cannot provide much help in terms of how to fix this. Hopefully this at least points you in the right direction.
- Matt
0 个评论
另请参阅
类别
在 Help Center 和 File 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!