MATLAB: Preference could not be accessed

preferenceworking folder

On starting Matlab
Warning: "D:\OneDrive\Dokumente\Matlab" using the Custom Working Folder preference could not be accessed. Using "D:\Hartmann\Dokumente\MATLAB" as the initial working folder instead.
Why can I not use the above folder "D:\OneDrive\… ? It used to work and suddenly I have problems. On a PC and on my laptop.

Best Answer

I had activated OneDrive Files On Demand on the computer and this feature is incompatible with MATLAB, seemingly because in this mode OneDrive works with place holders.
I deactivated this mode and now everything works fine.
Thanks!