- Create the button in your GUI (drag and drop the button onto the designer workspace)
- Right click the button, hover over 'callbacks', select 'AddButtonPushedFcn callback'.
- From the code view that will open after adding the callback function, use matlab's uigetfile function.
Creating a file upload option/button in App designer
21 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Shuyuan Chen
am 11 Mär. 2019
Kommentiert: Adam Danz
am 26 Sep. 2022
Hi all
I am currently using MATLAB App designer to create a waveform generator user interface, and the idea is apart from some standard fucntion been selected and hence generated, i.e. sine/cosine, the interface should also allow user to upload their interested signals such as modulated signal. Therefore I would like to create such a function using App desinger so that when the user click on the button, a file viewing window could pop up for file uploading.
Would someone could give me some hints how I am able to achieve this? Many thanks.
Kind regards,
Chen
0 Kommentare
Akzeptierte Antwort
Adam Danz
am 11 Mär. 2019
Bearbeitet: Adam Danz
am 12 Mär. 2019
% Button pushed function: Button
function ButtonPushed(app, event)
[file,path] = uigetfile('*.mat') %open a mat file
end
Weitere Antworten (1)
Sergio Prado Raposo
am 24 Nov. 2021
How can I make it so that when I try to open a file with another extension, it shows an error box and if it is the correct one, it shows a correct text box?
0 Kommentare
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!