Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Exporting data points to Excel with Matlab?

  1. Jun 23, 2015 #1
    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?
  2. jcsd
  3. Jun 23, 2015 #2


    User Avatar
    Homework Helper

  4. Jun 23, 2015 #3


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    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.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook