using output of one button as an input in another button
2 views (last 30 days)
Rik on 28 Jan 2022
If you really want to, you can call the callback function like any other function.
However, it makes much more sense to only use buttons to call functions. There is no rule against two callbacks ending up calling the same function. Something like this:
[filename,pathname] = uigetfile('*txt');
As DGM mentions, there are several ways to share data between different parts of your GUI, using guidata or nested functions are only two. For general advice and examples for how to create a GUI (and avoid using GUIDE), have look at this thread.