Convert set of images to pdf

Dear all,
I'd like to put many matlab fugures into a single .pdf file.
I thought an idea could be to make a loop to save all figures to image files by using imwrite and then use fwrite.
The prblem is that imwrite wants either a M-by-N (greyscale) or a
M-by-N-by-3 (truecolor) matrix to save the figure and I don't know I to reduce the matlabfigure I get to such a matrix. I tried with get, but I can only get the colormap as a useful information. No way I can save the figure to a single matrix.
Anyone could help?

Many thanks!



  • You have to open the figure, for example with the plot function, and without closing it code:

    print -dpdf

    it creates a pdf file with the figure inside.
  • go codeproject, it might can provide some useful information!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!