MATLAB Exporting data points to Excel with Matlab?

AI Thread Summary
To export data points from a Matlab optimization algorithm to Excel, the xlswrite function is recommended for its convenience. Users can write an entire range of cells to a sheet in one call, which is efficient for handling multiple trials. It is advisable to save all data first and then perform a single write operation for each trial's results on separate sheets. This approach streamlines the process and minimizes the number of write operations. Utilizing xlswrite effectively can enhance data management in Matlab.
Godric
Messages
18
Reaction score
3
I have an optimization algorithm running 50 full trials with up to 10,000 iterations each (it breaks off if the error goal is reached before that). I want to export the iteration number and the best function value at each iteration to an excel file, then after each trial completes move to the next sheet and start there with the next trial. Is there a simple way to do it?
 
Physics news on Phys.org
Yes. Matlab xlswrite is a very convenient way to write to an Excel file. Matlab can write an entire range of cells to a sheet with one call, so you might be better off saving the data and doing one big write for each sheet.
 

Similar threads

Replies
18
Views
6K
Replies
2
Views
2K
Replies
4
Views
6K
Replies
3
Views
28K
Replies
3
Views
3K
Replies
2
Views
8K
Back
Top