Open file explorer using matlab gui pushbutton -


i want create matlab gui can open file explorer using pushbutton , select file further processing. how can that?

also want know how assign .m function files pushbuttons. tried putting functionname.m file in callback of pushbutton. didn't work.

please me both doubts.

you'll need write callback function launch file selection dialog (uigetfile)

set(hbutton, 'callback', @mycallback)  function mycallback(src, evnt)     [fname, pname] = uigetfile();      filepath = fullfile(pname, fname);      % filepath  end 

in general if want call .m file within callback, you'll want wrap call in anonymous function

set(hbutton, 'callback', @(src,evnt)functionname()) 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

c# SetCompatibleTextRenderingDefault must be called before the first -