【肌电信号】脉搏信号分析(去噪+特征提取)matlab 源码含GUI

2023-11-07 08:10

本文主要是介绍【肌电信号】脉搏信号分析(去噪+特征提取)matlab 源码含GUI,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

一、简介

EMG,应用电子学仪器记录肌肉静止或收缩时的电活动,及应用电刺激检查神经、肌肉兴奋及传导功能的方法。英文简称EMG。通过此检查可以确定周围神经、神经元、神经肌肉接头及肌肉本身的功能状态。\ 通过测定运动单位电位的时限、波幅,安静情况下有无自发的电活动,以及肌肉大力收缩的波型及波幅,可区别神经原性损害和肌原性损害,诊断脊髓前角急、慢性损害(如脊髓前灰质炎、运动神经元疾病),神经根及周围神经病变(例如肌电图检查可以协助确定神经损伤的部位、程度、范围和预后)。另外对神经嵌压性病变、神经炎、遗传代谢障碍神经病、各种肌肉病也有诊断价值。此外,肌电图还用于在各种疾病的治疗过程中追踪疾病的恢复过程及疗效。\ 利用计算机技术,可作肌电图的自动分析,如解析肌电图、单纤维肌电图以及巨肌电图等,提高诊断的阳性率。\ 肌电图检查多用针电极及应用电刺激技术,检查过程中有一定的痛苦及损伤 ,因此除非必要 ,不可滥用此项检查。另外,检查时要求肌肉能完全放松或作不同程度的用力,因而要求受检者充分合作。对于某些检查,检查前要停药,如新斯地明类药物应于检查前16小时停用\ 记录肌肉动作电位的曲线(电描记图)称为肌电图。缩写为EMG。实际使用的描记方法有两种:一种是表面导出法,即把电极贴附在皮肤上导出电位的方法;另一种是针电极法,即把针电极刺入肌肉导出局部电位的方法。用后一种方法能分别记录肌肉每次的动作电位,而根据从每秒数次到二、三十次的肌肉动作电位情况,发现频率的异常。应用肌电图还可以诊断运动机能失常的原因。平常所用的针电极称为同心电极,它是把细针状电极穿过注射针的中心,两者绝缘固定制成的。

二、源代码

``` %% Program Start %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% 名称:信号处理课程设计 %% 功能:脉搏检测系统GUI主界面 %%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%

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

% Last Modified by GUIDE v2.5 29-Apr-2021 12:18:07

% Begin initialization code - DO NOT EDIT guiSingleton = 1; guiState = struct('guiName', mfilename, ... 'guiSingleton', guiSingleton, ... 'guiOpeningFcn', @mainjiemianOpeningFcn, ... 'guiOutputFcn', @mainjiemianOutputFcn, ... 'guiLayoutFcn', [] , ... 'guiCallback', []); if nargin && ischar(varargin{1}) guiState.gui_Callback = str2func(varargin{1}); end

if nargout [varargout{1:nargout}] = guimainfcn(guiState, varargin{:}); else guimainfcn(guiState, varargin{:}); end % End initialization code - DO NOT EDIT

% --- Executes just before mainjiemian is made visible. function mainjiemian_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 mainjiemian (see VARARGIN)

% Choose default command line output for mainjiemian handles.output = hObject; ha=axes('units','normalized','position',[0 0 1 1]); uistack(ha,'down') II=imread('1.jpg'); image(II) colormap gray set(ha,'handlevisibility','off','visible','off'); % Update handles structure

% Update handles structure guidata(hObject, handles);

% UIWAIT makes mainjiemian wait for user response (see UIRESUME) % uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line. function varargout = mainjiemian_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 togglebutton1. function togglebutton1_Callback(hObject, eventdata, handles) untitled; % hObject handle to togglebutton1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of togglebutton1

% --- Executes on button press in togglebutton2. function togglebutton2_Callback(hObject, eventdata, handles) yuchuli; % hObject handle to togglebutton2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of togglebutton2

% --- Executes on button press in togglebutton3. function togglebutton3_Callback(hObject, eventdata, handles) tezheng; % hObject handle to togglebutton3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of togglebutton3

% --- Executes when figure1 is resized. function figure1SizeChangedFcn(hObject, eventdata, handles) % hObject handle to figure1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) if nargout [varargout{1:nargout}] = guimainfcn(guiState, varargin{:}); else guimainfcn(gui_State, varargin{:}); end % End initialization code - DO NOT EDIT

% --- Executes just before jidian is made visible. function jidian_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 jidian (see VARARGIN)

% Choose default command line output for jidian handles.output = hObject; ha=axes('units','normalized','position',[0 0 1 1]); uistack(ha,'down') II=imread('666.jpg'); image(II) colormap gray set(ha,'handlevisibility','off','visible','off');

axes(handles.axes1); axes(handles.axes2); axes(handles.axes3); axes(handles.axes4); axes(handles.axes5); axes(handles.axes6); % Update handles structure guidata(hObject, handles);

% UIWAIT makes jidian wait for user response (see UIRESUME) % uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line. function varargout = jidian_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 when figure1 is resized. function figure1_SizeChangedFcn(hObject, eventdata, handles) % hObject handle to figure1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% --- Executes on button press in pushbutton1. function pushbutton1Callback(hObject, eventdata, handles) %%%%%把代码放到这,运行时自动加载 [filename,filepath]=uigetfile('C:\Users\dell\Desktop\信号处理课设-----杨硕\初始脉搏数据\MaiBobefore.txt'); filename=[filepath,filename]; [t,Plusepre]=textread(filename,'%f%f','headerlines',1);%读入2个浮点值,并跳过文档的第1行 [m,n]=size(Plusepre); n=3; s3=Plusepre;

%%%%%%%%%%%%—————提取2000个点进行数据处理——————%%%%%%%%%%%%%%%%%%%% fs=360;%采样率 x0=s3(1:2000);%取1到2000共2000个点 t=1:length(x0);%length(x0)指x0数组元素的个数 axes(handles.axes1); plot(t,x0) xlabel('采样点'); ylabel('magtitude'); title('标准脉搏信号') box1=msgbox('正在加载请稍候','提示'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%初步去除基线漂移%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%中值滤波%%%%%%%%%%%%%%%%%%%%%%%%%%%% L1=medfilt1(x0,330); %一维中值滤波,x0为数组,即要处理原始波形,n是中值滤波器的参数,L1是滤波以后的结果(数组) L2=x0-L1; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%频谱%%%%%%%%%%%%%%%%%%%%%%%% N=length(x0);%样点个数 df=fs/(N-1);%分辨率 f=(0:N-1)df;%其中每点的频率 Y=fft(L2(1:N))/N2;%真实的幅值 axes(handles.axes2); plot(f(1:N/2),abs(Y(1:N/2)));%傅里叶变换后的频谱图是对称的,这里需要一半就可以了 xlabel('频率/Hz'); ylabel('振幅'); axis ( [0 100 0 0.4] ); title('中值滤波后脉搏信号频率谱') drawnow; ```

三、运行结果

在这里插入图片描述\ 在这里插入图片描述\ 在这里插入图片描述\ 在这里插入图片描述\ 在这里插入图片描述\ 在这里插入图片描述

四、备注

版本:2014a

这篇关于【肌电信号】脉搏信号分析(去噪+特征提取)matlab 源码含GUI的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/362350

相关文章

Python中Tkinter GUI编程详细教程

《Python中TkinterGUI编程详细教程》Tkinter作为Python编程语言中构建GUI的一个重要组件,其教程对于任何希望将Python应用到实际编程中的开发者来说都是宝贵的资源,这篇文... 目录前言1. Tkinter 简介2. 第一个 Tkinter 程序3. 窗口和基础组件3.1 创建窗

Springboot请求和响应相关注解及使用场景分析

《Springboot请求和响应相关注解及使用场景分析》本文介绍了SpringBoot中用于处理HTTP请求和构建HTTP响应的常用注解,包括@RequestMapping、@RequestParam... 目录1. 请求处理注解@RequestMapping@GetMapping, @PostMappin

Spring Boot Interceptor的原理、配置、顺序控制及与Filter的关键区别对比分析

《SpringBootInterceptor的原理、配置、顺序控制及与Filter的关键区别对比分析》本文主要介绍了SpringBoot中的拦截器(Interceptor)及其与过滤器(Filt... 目录前言一、核心功能二、拦截器的实现2.1 定义自定义拦截器2.2 注册拦截器三、多拦截器的执行顺序四、过

C++ scoped_ptr 和 unique_ptr对比分析

《C++scoped_ptr和unique_ptr对比分析》本文介绍了C++中的`scoped_ptr`和`unique_ptr`,详细比较了它们的特性、使用场景以及现代C++推荐的使用`uni... 目录1. scoped_ptr基本特性主要特点2. unique_ptr基本用法3. 主要区别对比4. u

Nginx内置变量应用场景分析

《Nginx内置变量应用场景分析》Nginx内置变量速查表,涵盖请求URI、客户端信息、服务器信息、文件路径、响应与性能等类别,这篇文章给大家介绍Nginx内置变量应用场景分析,感兴趣的朋友跟随小编一... 目录1. Nginx 内置变量速查表2. 核心变量详解与应用场景3. 实际应用举例4. 注意事项Ng

Java多种文件复制方式以及效率对比分析

《Java多种文件复制方式以及效率对比分析》本文总结了Java复制文件的多种方式,包括传统的字节流、字符流、NIO系列、第三方包中的FileUtils等,并提供了不同方式的效率比较,同时,还介绍了遍历... 目录1 背景2 概述3 遍历3.1listFiles()3.2list()3.3org.codeha

Nginx分布式部署流程分析

《Nginx分布式部署流程分析》文章介绍Nginx在分布式部署中的反向代理和负载均衡作用,用于分发请求、减轻服务器压力及解决session共享问题,涵盖配置方法、策略及Java项目应用,并提及分布式事... 目录分布式部署NginxJava中的代理代理分为正向代理和反向代理正向代理反向代理Nginx应用场景

Redis中的有序集合zset从使用到原理分析

《Redis中的有序集合zset从使用到原理分析》Redis有序集合(zset)是字符串与分值的有序映射,通过跳跃表和哈希表结合实现高效有序性管理,适用于排行榜、延迟队列等场景,其时间复杂度低,内存占... 目录开篇:排行榜背后的秘密一、zset的基本使用1.1 常用命令1.2 Java客户端示例二、zse

Redis中的AOF原理及分析

《Redis中的AOF原理及分析》Redis的AOF通过记录所有写操作命令实现持久化,支持always/everysec/no三种同步策略,重写机制优化文件体积,与RDB结合可平衡数据安全与恢复效率... 目录开篇:从日记本到AOF一、AOF的基本执行流程1. 命令执行与记录2. AOF重写机制二、AOF的

MyBatis Plus大数据量查询慢原因分析及解决

《MyBatisPlus大数据量查询慢原因分析及解决》大数据量查询慢常因全表扫描、分页不当、索引缺失、内存占用高及ORM开销,优化措施包括分页查询、流式读取、SQL优化、批处理、多数据源、结果集二次... 目录大数据量查询慢的常见原因优化方案高级方案配置调优监控与诊断总结大数据量查询慢的常见原因MyBAT