When I restarted I got the following message which seems to explain it, but I will not delete my question in case it helps someone else,
Warning: MATLAB previously crashed due to a low-level graphics error. To prevent another crash in
this session, MATLAB is using software OpenGL instead of using your graphics hardware. To save
this setting for future sessions, use the opengl('save', 'software') command.
In my startup command I have the following line,
opengl hardware % Make lines more smooth
So I will change it to the following and hope that does the trick,
opengl('save', 'software')