Reputation: 41
I want to know how I can connect to an internet site when a button is pushed in a GUI. For example, if I push the button then a browser window can be popped up for "stackoverflow.com/".
Upvotes: 4
Views: 3288
Reputation: 125864
In the callback for your GUI push button, you can make a call to the function WEB to open a web browser to a given URL:
web('stackoverflow.com/');
For example:
uicontrol('Style','pushbutton',...
'Position',[50 50 100 25],...
'String','Go to SO!',...
'Callback',@(hObject,eventData) web('stackoverflow.com/'));
Upvotes: 5