MATLAB: Is there a way to tell uigetfile to start browsing in a folder other than the current one

uigetfileuiputfile

Sometimes I run uigetfile multiple times and the user will typically want to read in files from the same directory/folder each time. I'm looking for a way to tell uigetfile to resume browsing from the last folder visited in the previous call to uigetfile. I can easily obtain the path name of the last folder visited, but can't see how to tell uigetfile to resume from there, other than to CD to the folder, which is awkward for various reasons, and not the solution I prefer.
I'd like to be able to do similar things with uiputfile, etc… Any suggestions?

Best Answer

Edit
uigetfile('*.m','select the m file','E:/matlab')