I am having trouble setting up a save file folder. It just seems to save my file to whatever my current directory is. Is it possible to save in a certain location relative to the .m file that I run. The file that I run is deep withing my folder structure, and I want to save it a folder back with current date. I tried using mkdir() but that would just make folders anywhere my current path was. I also tried using CD to my path location but it just seems to be ignored and it starts saving anywhere. One thing that I also see is repeating folder structures where my code basically recreates the entire two folders within my directory. Any solution to this Problem?
MATLAB: Saving a file in a relative directory on the current .m file.
folder structurepathsave
Best Answer