MATLAB: How to save a file .wav with any name in any folder by using GUI

buttonguisavewav

Hi, I am trying to save a file .wav with any name in any folder by using a save button in GUI.

Best Answer

[file,path] = uiputfile('*.wav', 'Save Wav File');
if isnumeric(file)
return; %user canceled
end
filename = fullfile(path, file);
audiowrite(filename, myGui.datasound, myGui.freqSam);