From: Maximilian NotImportant on
Hello again!

Does anyone of you guys know how to use save() or saveas() to save files in a specified folder? i dont want to save the files all to the current work folder. i want to specify or even create a new folder and save the files there (in the code).

I am thankful for every idea!

Max
From: Wayne King on
"Maximilian NotImportant" <MaximilianNh(a)gmx.de> wrote in message <hra85h$pmg$1(a)fred.mathworks.com>...
> Hello again!
>
> Does anyone of you guys know how to use save() or saveas() to save files in a specified folder? i dont want to save the files all to the current work folder. i want to specify or even create a new folder and save the files there (in the code).
>
> I am thankful for every idea!
>
> Max

Assume the variable is called Data in your workspace

save('c:\yourfolder\Data.mat','Data');

If you are working in linux or Mac, make the obvious changes to the way paths are specified.

You can also change directory in MATLAB and then if you just issue the save command without specifying the path, it will save in the current working directory.

Wayne
From: ImageAnalyst on
And call uigetdir() if you want your user to select the folder where
the files should be saved. Then, once you have your folder, build up
your full path using the function fullfile().