MATLAB: Error using save funktion

does not existerror saveMATLABmatlabpathsave

Hey folks,
i'm trying to save my workspace using the "save"-Funktion, I thought it shouldn't be difficult… So that's my error:
Error using save
Cannot create 'DataPackageWorkspace.mat' because
'Aufgabe\Henyey-Greenstein\IdentifyG' does not exist.
I used
save('Aufgabe\Henyey-Greenstein\IdentifyG\DataPackageWorkspace.mat')
and my matlabpath is
F:\WS\Aufgabe
has any body an idea what's wrong with it?!

Best Answer

What is the full path of the folder you want to save the file in? Is it by chance
F:\WS\Aufgabe\Henyey-Greenstein\IdentifyG\
If so, you need to remove the "Aufgabe" in your save path as it's already part of the matlab path.