I am trying to save a figure in a while loop as a pdf. Currently I am getting the correct name for the figure but it is saving as .fig instad of .pdf.
Mass_ = 'Mass_map_';month = name(14:15);contourf(mydata)saveas(gcf, sprintf(strcat(Mass_, month),'.pdf'))
Thanks for any help, I am pretty new to matlab so any advice is taken
Best Answer