Exporting data points to Excel with Matlab?

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
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.