function varargout = Tel(varargin)
% TEL MATLAB code for Tel.fig
% TEL, by itself, creates a new TEL or raises the existing
% singleton*.
%
% H = TEL returns the handle to a new TEL or the handle to
% the existing singleton*.
%
% TEL('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in TEL.M with the given input arguments.
%
% TEL('Property','Value',...) creates a new TEL or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before Tel_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to Tel_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help Tel
% Last Modified by GUIDE v2.5 27-Sep-2017 18:40:26
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @Tel_OpeningFcn, ...
'gui_OutputFcn', @Tel_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% global NUM;
% NUM =[];
% --- Executes just before Tel is made visible.
function Tel_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to Tel (see VARARGIN)
% Choose default command line output for Tel
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes Tel wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = Tel_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
n=[1:1000]; % 每个数字 1000 个采样点表示
d1=sin(0.5346*n)+sin(0.9273*n); % 对应行频列频叠加
n1=strcat(get(handles.edit1,'string'),'1'); % 获取数字号码
set(handles.edit1,'string',n1); % 显示号码
space=zeros(1,100); %100 个 0 模拟静音信号
global NUM
phone=[NUM,d1];
NUM=[phone,space]; % 存储连续的拨号音信号
sound(d1,8192); % 产生拨号音
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
n=[1:1000]; % 每个数字 1000 个采样点表示
d2=sin(0.5346*n)+sin(1.0247*n); % 对应行频列频叠加
n2=strcat(get(handles.edit1,'string'),'2'); % 获取数字号码
set(handles.edit1,'string',n2); % 显示号码
space=zeros(1,100); %100 个 0 模拟静音信号
global NUM
phone=[NUM,d2];
NUM=[phone,space]; % 存储连续的拨号音信号
sound(d2,8192); % 产生拨号音
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
n=[1:1000]; % 每个数字 1000 个采样点表示
d3=sin(0.5346*n)+sin(1.1328*n); % 对应行频列频叠加
n3=strcat(get(handles.edit1,'string'),'3'); % 获取数字号码
set(handles.edit1,'string',n3); % 显示号码
space=zeros(1,100); %100 个 0 模拟静音信号
global NUM
phone=[NUM,d3];
NUM=[phone,space]; % 存储连续的拨号音信号
sound(d3,8192); % 产生拨号音
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
n=[1:1000]; % 每个数字 1000 个采样点表示
d4=sin(0.5906*n)+sin(0.9273*n); % 对应行频列频叠加
n4=strcat(get(handles.edit1,'string'),'4'); % 获取数字号码
set(handles.edit1,'string',n4); % 显示号码
space=zeros(1,100); %100 个 0 模拟静音信号
global NUM
phone=[NUM,d4];
NUM=[phone,space]; % 存储连续的拨号音信号
sound(d4,8192); % 产生拨号音
% --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
n=[1:1000]; % 每个数字 1000 个采样点表示
d5=sin(0.5906*n)+sin(1.0247*n); % 对应行频列频叠加
n5=strcat(get(handles.edit1,'string'),'5'); % 获取数字号码
set(handles.edit1,'string',n5); % 显示号码
space=zeros(1,100); %100 个 0 模拟静音信号
global NUM
phone=[NUM,d5];
NUM=[phone,space]; % 存储连续的拨号音信号
sound(d5,8192); % 产生拨号音
% --- Executes on button press in pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
n=[1:1000]; % 每个数字 1000 个采样点表示
d6=sin(0.5906*n)+sin(1.1328*n); % 对应行频列频叠加
n6=strcat(get(handles.edit1,'string'),'6'); % 获取数字号码
set(handles.edit1,'string',n6); % 显示号码
space=zeros(1,100); %100 个 0 模拟静音信号
global NUM
phone=[NUM,d6];
NUM=[phone,space]; % 存储连续的拨号音信号
sound(d6,8192); % 产生拨号音
% --- Executes on button press in pushbutton7.
function pushbutton7_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
n=[1:1000]; % 每个数字 1000 个采样点表示
d7=sin(0.6535*n)+sin(0.9273*n); % 对应行频列频叠加
n7=strcat(get(handles.edit1,'string'),'7'); % 获取数字号码
set(handles.edit1,'string',n7); % 显示号码
space=zeros(1,100); %100 个 0 模拟静音信号
global NUM
phone=[NUM,d7];
NUM=[phone,space]; % 存储连续的拨号音信号
sound(d7,8192); % 产生拨号音
% --- Executes on bu