it fixes the issue I found this solution at the bottom of this thread:
% create an example fig that we want to format with style file 'foo'
% get style sheet info
snam='foo'; % The name of your style file (NO extension)
%apply style sheet info
fnam='myfig.jpeg'; % your file name
s.Format = 'jpeg'; %I needed this to make it work but maybe you wont.