How to export the results of optimization by optimization toolbox to excel
1 次查看(过去 30 天)
显示 更早的评论
I am using ga in optimization toolbox to find the optimal operating power points of a hybrid renewable station consisting of PV, battery,fuel cell and diesel generator. Each 20 mins, MATLAB should read the contents of excel sheet based on which optimization will be done. The results of optimization are to be written to the excel at allotted columns, so that it can be read by a third software. Is it possible to read data for optimization from excel and to export the optimized results to excel using the optimization toolbox. Any suggestions will be valuable for my work.Thanks.
0 个评论
回答(1 个)
colordepth
2025-1-20
To handle Excel data in MATLAB, use the "readtable" function to import data and the "writetable" function to export results. For more details, see the documentation for "readtable" at https://www.mathworks.com/help/matlab/ref/readtable.html and "writetable" at https://www.mathworks.com/help/matlab/ref/writetable.html.
If you want to execute custom code during an optimization session, check out this example: https://www.mathworks.com/help/gads/custom-output-function-for-genetic-algorithm.html. It demonstrates using a custom output function in the genetic algorithm solver to set up and maintain a plot during iterations.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Problem-Based Optimization Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!