底下一個範例程式,用GUIDE實現的,只有兩個按鈕,Tag各位自己看得出來。真正加入的程式碼不多,全部元件使用預設性質即可。
function varargout = Test_Interrupt_guidata(varargin)
% TEST_INTERRUPT_GUIDATA M-file for Test_Interrupt_guidata.fig
% TEST_INTERRUPT_GUIDATA, by itself, creates a new TEST_INTERRUPT_GUIDATA or raises the existing
% singleton*.
%
% H = TEST_INTERRUPT_GUIDATA returns the handle to a new TEST_INTERRUPT_GUIDATA or the handle to
% the existing singleton*.
%
% TEST_INTERRUPT_GUIDATA('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in TEST_INTERRUPT_GUIDATA.M with the given input arguments.
%
% TEST_INTERRUPT_GUIDATA('Property','Value',...) creates a new TEST_INTERRUPT_GUIDATA or raises the
% existing singleton*. Starting from the left, property v