Save cvx results

Hello All,
I’m trying to save the cvx results into a file in order to analyse the gap and the best sol.
I used cvx_solver_settings( ‘dumpfile’, ‘file_name’ ) and got an ‘output’ char file with all the results usually printed on the screen as a one long string.
Is there a better option to get the results into table file?

Thank!

Which specific “results” do you want to save?

If just cxv_optval, cvx_status, optimal (returned) values of CVX variables, these are available in MATLAB after cvx_end, and you can save these into arrays, mat files or whatever MATLAB allows you to do.

If you want solver output displayed on the screen, then other than the dumpfile approach, another option is to save the output into a file using MATLAB’s diary command, and then process the diary file using PERL, or whatever.

Thank you.

As I want to run a simulation that would run the cvx file many times (1000 maybe); I was hoping not to use the diary command as I don’t want to print the cvx output to the screen every time.

Perhaps you can invoke MATLAB in batch mode and redirect (screen) output to a file. I leave the details to you.