一、简介
脉搏,指人体血管的搏动。心脏昼夜不息地收缩与舒张,将新鲜的血液源源不断地通过血管传向全身。同时,血流量随着心脏的搏动在不断的变化,引起血管内壁压力和容积发生变化,这些变化随着血流向前传播,从而引起血管搏动。在体表较浅的血管处可感受到这种搏动,即为脉搏。通过传感器将这种搏动转换为电信号,即为脉搏信号。
二、源代码
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 1 系统界面生成
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function varargout = PulseProcessSystem(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @PulseProcessSystem_OpeningFcn, ...
'gui_OutputFcn', @PulseProcessSystem_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
function PulseProcessSystem_OpeningFcn(hObject, eventdata, handles, varargin)
handles.output = hObject;
function varargout = PulseProcessSystem_OutputFcn(hObject, eventdata, handles)
%% 2 脉搏信号导入
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function pushbutton1_Callback(hObject, eventdata, handles)%载入文件
[filename,filepath]=uigetfile('C:\Users\sharmee\Desktop\PulseProcessSystem\XG_MaiBo01.txt');
filename=[filepath,filename];
[t,Pluse_pre]=textread(filename,'%f%f','headerlines',1);%读入2个浮点值,并跳过文档的第1行
[m,n]=size(Pluse_pre);
n=3;
s3=Pluse_pre;
for i=1:1:n
s1=Butter(s3);%巴特沃斯滤波器
s2=Xnoise(s1);
s3=xianbo(s2);
end
Pluse_post=s3;
date3=s3;
Pluse_post=s3;
handles.m=m;
handles.t=t;
handles.Pluse_pre=Pluse_pre;
handles.Pluse_post=Pluse_post;
handles.filepath=filepath;
handles.date3=date3;
guidata(hObject, handles);
%% 3 原始信号回放
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function axes1_CreateFcn(hObject, eventdata, handles)
function pushbutton6_Callback(hObject, eventdata, handles)
m=handles.m;
Pluse_pre=handles.Pluse_pre;
Pluse_post=handles.Pluse_post;
t=1:m-1000;
xmin1=min(Pluse_pre);
xmax1=max(Pluse_pre);
axes(handles.axes1);
for j=800:100:5000
end
guidata(hObject, handles);
三、运行结果
四、备注
完整代码或者代写添加QQ912100926。
往期回顾>>>>>>
【信号处理】基于GUI界面之处理录音与音频【Matlab 123期】
【信号处理】CDR噪声和混响抑制【含Matlab源码 198期】
【信号处理】最小二乘法解决稀疏信号恢复问题【Matlab 199期】
【信号处理】遗传算法的VST混响【Matlab 200期】
【信号处理】HMM的睡眠状态检测【Matlab 201期】
【信号处理】小波变换的音频水印嵌入提取【Matlab 202期】
【信号处理】ICA算法信号分离【Matlab 203期】