How to get the name of the mat file saved from the uisave function?

2 views (last 30 days)
I am going to write a GUI based program. The workspace data-set needs to be saved as a Project file. In fact, I want to design some buttons named 'Save' , 'Save as' and 'Load'. Anyone can help me to write its code suitably?. I need to know the name and address of the file that has been saved from uisave function.

Accepted Answer

Jan
Jan on 8 Oct 2016
Edited: Jan on 8 Oct 2016
Do not use uisave but:
[filename, filepath] = uiputfile('*.mat', 'Save the project file:')
if isequal(filename,0) || isequal(pathname,0)
disp('User pressed cancel')
return;
end
FileName = fullfile(pathname, filename);
save(FileName, 'YourData');

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!