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

Matlab, saving the plot.

  1. Mar 4, 2009 #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. Mar 5, 2009 #2


    User Avatar
    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. Mar 5, 2009 #3
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook