How do I program my app to export a file to Windows File Explorer?

I am currently designing an app using Matlab's App Designer that processes audio and my query is very simple: I want to program a button so that when it gets pushed a Windows File Explorer (or Finder in OS) window shows up and I can save my file with a specified name and location as I would normally proceed in any other standard program.
I already know of '[file,path]= uiputfile({'*.*'});' but it doesn't create any file when I save it..
I have to join it with this line of code 'audiowrite(filename,app.audio,app.fs);' but I'm not sure how to!
Please help guys! Thanks in advance!

답변 (1개)

Jan
Jan 2018년 4월 30일
편집: Jan 2018년 4월 30일
[file, folder] = uiputfile('*.wav');
if ~isequal(file, 0) % User did not press Cancel:
audiowrite(fullfile(folder, file), app.audio, app.fs);
end
Compare this with the example for xlswrite at the bottom of the documentation: doc uiputfile (link)

카테고리

도움말 센터File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

질문:

2018년 4월 29일

편집:

Jan
2018년 4월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by