function varargout = measurement(varargin)
% MEASUREMENT MATLAB code for measurement.fig
% MEASUREMENT, by itself, creates a new MEASUREMENT or raises the existing
% singleton*.
%
% H = MEASUREMENT returns the handle to a new MEASUREMENT or the handle to
% the existing singleton*.
%
% MEASUREMENT('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in MEASUREMENT.M with the given input arguments.
%
% MEASUREMENT('Property','Value',...) creates a new MEASUREMENT or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before measurement_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to measurement_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 measurement
% Last Modified by GUIDE v2.5 18-Apr-2015 21:08:53
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @measurement_OpeningFcn, ...
'gui_OutputFcn', @measurement_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
% --- Executes just before measurement is made visible.
function measurement_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 measurement (see VARARGIN)
global dialWav;
dialWav = [];
% Choose default command line output for measurement
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes measurement wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = measurement_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;
% --- 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)
recObj = audiorecorder(8000, 16, 1);
a=str2double(get(handles.edit1,'String'));
recordblocking(recObj, a);
d='complete';
set(handles.edit3,'String',d);
global dialWav;
dialWav = getaudiodata(recObj);
guidata(hObject,handles);
% --- Executes on key press with focus on pushbutton1 and none of its controls.
function pushbutton1_KeyPressFcn(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata structure with the following fields (see UICONTROL)
% Key: name of the key that was pressed, in lower case
% Character: character interpretation of the key(s) that was pressed
% Modifier: name(s) of the modifier key(s) (i.e., control, shift) pressed
% handles structure with handles and user data (see GUIDATA)
% --- 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)
global dialWav;
Fs=8000;
X=wavcut(dialWav,Fs);
num=[];
for i=1:2:length(X)
xnum=Num2(dialWav(X(i):X(i+1),1),Fs,(i+1)/2);
if xnum~=-1
num=[num;xnum;];
end
end
num=num'
c=num2str(num);
set(handles.edit2,'String',c);
guidata(hObject,handles);
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
record_time = str2double(get(hObject,'String'));
if(isempty(record_time))
set(hObject,'String','10');
end
guidata(hObject, handles);
% --- 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
function edit2_Callback(hObject, eventdata, handles)
% hObject handle to edit2 (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 edit2 as text
% str2double(get(hObject,'String')) returns contents of edit2 as a double
phonenumber = str2double(get(hObject,'String'));
if(isempty(phonenumber))
set(hObject,'String','0');
end
guidata(hObject, handles);
% --- Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (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 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)
e1='wait';
e2='0';
set(handles.edit3,'String',e1);
set(handles.edit2,'String',e2);
global dialWav;
dialWav={0};
guidata(hObject,handles);
function edit3_Callback(hObject, eventdata, handles)
% hObject handle to edit3 (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 edit3 as text
% str2double(get(hObject,'String')) returns contents of edit3 as a double
% --- Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (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
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
利用号码双频表,利用傅里叶变换,实现由电话按键音,识别电话号码功能。需要自己录一段电话按键音。运行mainprocess自动输出识别号码。 (Dual-use table numbers, Fourier transform, achieved by touch-tone telephone, phone number identification function. It needs its own record a touch-tone phone. Mainprocess run automatically output identification number.)
资源推荐
资源详情
资源评论
收起资源包目录
telnumber_recognise.zip (9个子文件)
Num2.m 860B
findnum.m 415B
wavcut.m 698B
dialWav.wav 156KB
measurement.fig 11KB
findmaxf.m 485B
Num.m 870B
mainprocessing.m 189B
measurement.m 8KB
共 9 条
- 1
资源评论
- #完美解决问题
- #运行顺畅
- #内容详尽
- #全网独家
- #注释完整
JoshGao
- 粉丝: 457
- 资源: 98
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于PI电流控制器的三相永磁同步电动机矢量控制仿真研究(MATLAB SIMULINK模型)及结果分析报告,基于PI电流控制器的PMSM矢量控制 MATLAB SIMULINK仿真模型(2018b)及
- 基于转子磁链定向的异步电动机矢量控制系统MATLAB仿真模型详解及性能分析,基于转子磁链定向的异步电动机矢量控制系统 MATLAB SIMULINK仿真模型(2018b)及说明报告,仿真结果良好 报
- 2025医疗“三基三严”知识考试题库及参考答案.pptx
- 2025专业技术人员继续教育公需课题库(含答案).ppt
- 2025中小学教师编制考试教育理论基础知识必刷题库(含答案).ppt
- 2025羽毛球知识竞赛题库及答案.pptx
- 2025院前外伤的处理考核试题及答案.pptx
- 2025预防网络诈骗专项培训考试题库(含答案).pptx
- 2025职业教育知识竞赛题库(含答案).pptx
- 2025中华传统文化国学知识竞赛题库及答案.pptx
- 2025职业卫生技术人员评价方向考试题库(含答案).pptx
- 2025中小学教师编制考试教育理论基础知识必刷题库及答案.pptx
- 2025中小学教师编制考试理论基础知识复习题库(含答案).pptx
- 2025专业技术人员继续教育公需课题库(附含答案).pptx
- 2025专业技术人员继续教育公需课试题库(含答案).pptx
- 2025装载机理论考试试题库(含答案).pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功