Matlab, saving the plot.

  1. Hey, I am making some plots in a loop and I want to save the different plots in different files.

    I am new to Matlab so I don't know what to do, I tried the command

    print('-dpdf','plot n = %s'n)

    ,but that was an 'Unexpected MATLAB expression.'
  2. jcsd
  3. MATLABdude

    MATLABdude 1,723
    Science Advisor

    Take a look through the pertinent MATLAB documentation page:

    (Exporting to various formats is about half-way through).

    Note that you should probably resize the plot (to, say, Letter or A4 size) prior to exporting, otherwise things may look rather pixellated (though there is an option for vector output).
  4. Thanks.
Know someone interested in this topic? Share this thead via email, Google+, Twitter, or Facebook

Have something to add?