一、簡介
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 mainjiemian_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to mainjiemian_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 mainjiemian
% Last Modified by GUIDE v2.5 29-Apr-2021 12:18:07
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @mainjiemian_OpeningFcn, ...
'gui_OutputFcn', @mainjiemian_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 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 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)
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 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 pushbutton1_Callback(hObject, eventdata, handles)
%%%%%把代碼放到這,運行時自動加載
[filename,filepath]=uigetfile('C:\Users\dell\Desktop\信號處理課設-----楊碩\初始脈搏資料\MaiBobefore.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;
%%%%%%%%%%%%—————提取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))/N*2;%真實的幅值
axes(handles.axes2);
plot(f(1:N/2),abs(Y(1:N/2)));%傅里葉變換后的頻譜圖是對稱的,這里需要一半就可以了
xlabel('頻率/Hz');
ylabel('振幅');
axis ( [0 100 0 0.4] );
title('中值濾波后脈搏信號頻率譜')
drawnow;
三、運行結果
四、備注
完整代碼或者代寫添加QQ 1564658423
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/283118.html
標籤:其他
