Your comments

Yes, I am generating .mat files.

I cannot seem to find the simplest conditions to generate the errors and it is only after a lot of code. I was hoping you would say "Oh, MATLAB doesn't like saving XXXX so instead do YYYY".

I'll get back if I can easily replicate the problem with a short example.

Thanks, JF.