How to change directory or folder in Matlab in a program?
4 views (last 30 days)
Hello, I wanted to know how I can change to another folder in the same directory while I program . That is, I'm in a folder called ' first' for example, that is where my .m file 'm programming , and inside that folder there is another called ' second ' in which I want to place me in the program to check for certain files or anything . How could I?
In short , to have something like this:
function [ ] = main ( ) % that is in the main folder or directory % This program would other lines .
% And then go to the folder ' second '
if exist ( .wav file ) ~ = 2 % Within that folder to see if there is , then go back to the source folder .
Thanks in advanced!