✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
🍎个人主页:Matlab科研工作室
🍊个人信条:格物致知。
更多Matlab仿真内容点击👇
⛄ 内容介绍
为了加强学生对"信号与系统"课程理论知识的掌握及提高其解决实际问题的能力,同时给课堂教学添加活力,建立基于 MATLAB的实验仿真系统.此实验仿真系统用GUI实现图形用户界面,以便于学生认识和操作.这使得利用计算机辅助完成该课程相关分析的可视化建模及仿真调试成为可能.
⛄ 部分代码
function varargout = GUI_Start(varargin)
% GUI_START MATLAB code for GUI_Start.fig
% GUI_START, by itself, creates a new GUI_START or raises the existing
% singleton*.
%
% H = GUI_START returns the handle to a new GUI_START or the handle to
% the existing singleton*.
%
% GUI_START('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in GUI_START.M with the given input arguments.
%
% GUI_START('Property','Value',...) creates a new GUI_START or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before GUI_Start_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to GUI_Start_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 GUI_Start
% Last Modified by GUIDE v2.5 11-Mar-2023 23:34:15
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @GUI_Start_OpeningFcn, ...
'gui_OutputFcn', @GUI_Start_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 GUI_Start is made visible.
function GUI_Start_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 GUI_Start (see VARARGIN)
% Choose default command line output for GUI_Start
handles.output = hObject;
set(handles.axes4,'visible','off');
axes(handles.axes4);
image = imread('logo.jpg');
imshow(image);
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes GUI_Start wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = GUI_Start_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)
set(GUI_Start,'visible','off');
set(PPFXGUI,'visible','on');
% --- Executes during object creation, after setting all properties.
function figure1_CreateFcn(hObject, eventdata, handles)
% hObject handle to figure1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% --- Executes during object creation, after setting all properties.
function uipanel1_CreateFcn(hObject, eventdata, handles)
% hObject handle to uipanel1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% --- Executes during object creation, after setting all properties.
function axes1_CreateFcn(hObject, eventdata, handles)
% hObject handle to axes1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: place code in OpeningFcn to populate axes1
% --- Executes during object creation, after setting all properties.
function axes4_CreateFcn(hObject, eventdata, handles)
% hObject handle to axes4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: place code in OpeningFcn to populate axes4
⛄ 运行结果
⛄ 参考文献
[1] 王康佳, 刘诗伟, 孙番典. 基于Matlab/DSP Builder任意波形信号发生器的两种设计[J]. 现代电子技术, 2011(03):179-181.
[2] 方小爱, 张胜, 薛雅楠,等. 基于单片机与MATLAB实现信号的波形显示[J]. 科技视界, 2013(31):2.
[3] 王嘉梅. 基于MATLAB的数字信号处理与实践开发[M]. 西安电子科技大学出版社, 2007.