【数字信号】基于matlab GUI手机拨号音效模拟【含Matlab源码 909期】

举报
海神之光 发表于 2022/05/29 03:14:48 2022/05/29
【摘要】 一、获取代码方式 获取代码方式1: 完整代码已上传我的资源:【数字信号】基于matlab GUI手机拨号音效模拟【含Matlab源码 909期】 获取代码方式2: 通过订阅紫极神光博客付费专栏,凭支付...

一、获取代码方式

获取代码方式1:
完整代码已上传我的资源:【数字信号】基于matlab GUI手机拨号音效模拟【含Matlab源码 909期】

获取代码方式2:
通过订阅紫极神光博客付费专栏,凭支付凭证,私信博主,可获得此代码。

备注:
订阅紫极神光博客付费专栏,可免费获得1份代码(有效期为订阅日起,三天内有效);

二、部分源代码

function varargout = tul(varargin)
% TUL MATLAB code for tul.fig
%      TUL, by itself, creates a new TUL or raises the existing
%      singleton*.
%
%      H = TUL returns the handle to a new TUL or the handle to
%      the existing singleton*.
%
%      TUL('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in TUL.M with the given input arguments.
%
%      TUL('Property','Value',...) creates a new TUL or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before tul_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to tul_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 tul

% Last Modified by GUIDE v2.5 09-May-2021 18:33:50

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @tul_OpeningFcn, ...
                   'gui_OutputFcn',  @tul_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 tul is made visible.
function tul_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 tul (see VARARGIN)

% Choose default command line output for tul
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes tul wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = tul_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)
n=[1:1000];
d1=sin(0.5343*n)+sin(0.9268*n);
n1=strcat(get(handles.edit1,'string'),'1');
set(handles.edit1,'string',n1);
space=zeros(1,100);
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];
d2=sin(0.5343*n)+sin(1.024*n);
n2=strcat(get(handles.edit1,'string'),'2');
set(handles.edit1,'string',n2);
space=zeros(1,100);
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];
d3=sin(0.5343*n)+sin(1.1323*n);
n3=strcat(get(handles.edit1,'string'),'3');
set(handles.edit1,'string',n3);
space=zeros(1,100);
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];
d4=sin(0.59033*n)+sin(0.9268*n);
n4=strcat(get(handles.edit1,'string'),'4');
set(handles.edit1,'string',n4);
space=zeros(1,100);
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];
d5=sin(0.59033*n)+sin(1.024*n);
n5=strcat(get(handles.edit1,'string'),'5');
set(handles.edit1,'string',n5);
space=zeros(1,100);
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];
d6=sin(0.59033*n)+sin(1.1323*n);
n6=strcat(get(handles.edit1,'string'),'6');
set(handles.edit1,'string',n6);
space=zeros(1,100);
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];
d7=sin(0.6531*n)+sin(0.9268*n);
n7=strcat(get(handles.edit1,'string'),'7');
set(handles.edit1,'string',n7);
space=zeros(1,100);
global NUM
phone=[NUM,d7];
NUM=[phone,space];
sound(d7,8192);

% --- Executes on button press in pushbutton8.
function pushbutton8_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton8 (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];
d8=sin(0.6531*n)+sin(1.024*n);
n8=strcat(get(handles.edit1,'string'),'8');
set(handles.edit1,'string',n8);
space=zeros(1,100);
global NUM
phone=[NUM,d8];
NUM=[phone,space];
sound(d8,8192);

% --- Executes on button press in pushbutton9.
function pushbutton9_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton9 (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];
d9=sin(0.6531*n)+sin(1.1323*n);
n9=strcat(get(handles.edit1,'string'),'9');
set(handles.edit1,'string',n9);
space=zeros(1,100);
global NUM
phone=[NUM,d9];
NUM=[phone,space];
sound(d9,8192);
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
  
 

四、运行结果

在这里插入图片描述

五、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1] 沈再阳.精通MATLAB信号处理[M].清华大学出版社,2015.
[2]高宝建,彭进业,王琳,潘建寿.信号与系统——使用MATLAB分析与实现[M].清华大学出版社,2020.
[3]王文光,魏少明,任欣.信号处理与系统分析的MATLAB实现[M].电子工业出版社,2018.

文章来源: qq912100926.blog.csdn.net,作者:海神之光,版权归原作者所有,如需转载,请联系作者。

原文链接:qq912100926.blog.csdn.net/article/details/117152759

【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。