% Set figure size and save
set(gcf, 'Position', [1 1 900 250]);
fig = gcf;
fig.PaperUnits = 'points';
fig.PaperPosition = [0 0 fig.Position(3) fig.Position(4)];
fig.PaperSize = [fig.Position(3) fig.Position(4)];
fig.PaperPositionMode = 'auto';
fig_pos = fig.PaperPosition;
fig.PaperSize = [fig_pos(3) fig_pos(4)];
saveas(fig, ['something.pdf'], 'pdf');
Optionally, to save it based on the currently running script's name:
saveas(fig, [mfilename('fullpath'), '.pdf'], 'pdf');