欢迎来到三一办公! | 帮助中心 三一办公31ppt.com(应用文档模板下载平台)
三一办公
全部分类
  • 办公文档>
  • PPT模板>
  • 建筑/施工/环境>
  • 毕业设计>
  • 工程图纸>
  • 教育教学>
  • 素材源码>
  • 生活休闲>
  • 临时分类>
  • ImageVerifierCode 换一换
    首页 三一办公 > 资源分类 > DOC文档下载  

    基于某matlab的肌电信号处理程序.doc

    • 资源ID:1088256       资源大小:62.50KB        全文页数:14页
    • 资源格式: DOC        下载积分:10金币
    快捷下载 游客一键下载
    会员登录下载
    三方登录下载: 微信开放平台登录 QQ登录  
    下载资源需要10金币
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    基于某matlab的肌电信号处理程序.doc

    word基于matlab的肌电信号处理程序:function varargout = untitled(varargin)% UNTITLED, by itself, creates a new UNTITLED or raises the existing% singleton*.% H = UNTITLED returns the handle to a new UNTITLED or the handle to% the existing singleton*.% UNTITLED('CALLBACK',hObject,eventData,handles,.) calls the local% function named CALLBACK in UNTITLED.M with the given input arguments.% UNTITLED('Property','Value',.) creates a new UNTITLED or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before untitled_OpeningF gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to untitled_OpeningF 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 untitled% Last Modified by GUIDE v2.5 08-Nov-2014 12:45:18% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, . 'gui_Singleton', gui_Singleton, . 'gui_OpeningF', untitled_OpeningF, . 'gui_OutputF', untitled_OutputF, . 'gui_LayoutF', , . 'gui_Callback', );if nargin && ischar(varargin1) gui_State.gui_Callback = str2func(varargin1);endif nargout varargout1:nargout = gui_mainf(gui_State, varargin:);else gui_mainf(gui_State, varargin:);end% End initialization code - DO NOT EDIT% - Executes just before untitled is made visible.function untitled_OpeningF(hObject, eventdata, handles, varargin)% This function has no output args, see OutputF.% 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 mand line arguments to untitled (see VARARGIN)% Choose default mand line output for untitledhandles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes untitled wait for user response (see UIRESUME)% uiwait(handles.figure1);% - Outputs from this function are returned to the mand line.function varargout = untitled_OutputF(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 mand line output from handles structurevarargout1 = 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)global s;global a;global t;global count;% count=1;filename,filepath=uigetfile('*.txt','Ñ¡ÔñÎļþ');%Ñ¡ÔñÊý¾ÝÎļþ str=filepath filename; s=load(str); a=s(:,7); t=s(:,1); axes(handles.axes1);plot(t,a);xlabel('ʱ¼ä');ylabel('±äÁ¿');title('ԭʼÐźÅ'); if count=2 global s2;global a2;global t2; filename,filepath=uigetfile('*.txt','Ñ¡ÔñÎļþ'); str=filepath filename; s2=load(str); a2=s2(:,7); t2=s2(:,1); plot(handles.axes2,t2,a2); end count=1; % - 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)global a;global t;global s;global y;% global IR;% global SORH;y=fft(a,20000);M =length (a) ;N=length(y);p=size(a);% s1=a(1:20000);C L=wavedec(a,3,'db5');cA3=appcoef(C,L,'db5',3);cD1=detcoef(C,L,1);cD2=detcoef(C,L,2);cD3=detcoef(C,L,3);thr1=thselect(cD1,'rigrsure');thr2=thselect(cD2,'rigrsure');thr3=thselect(cD3,'rigrsure');TR=thr1,thr2,thr3;SORH='s'XC,CXC,LXC,PERFO,PERF2=wdencmp('lvd',a,. 'db5',3,TR,SORH);L=p(2);x=a;h=XC;F=0;M=0;for ii=1:L m(ii)=(x(ii)-y(ii)2; t(ii)=y(ii)2; f(ii)=t(ii)/m(ii); F=F+f(ii); M=M+m(ii);end;SNR=10*log10(F);MSE=M/N;SM=SNR/MSE;axes(handles.axes2);plot(XC(1:10000);xlabel('ʱ¼ä');ylabel('±äÁ¿');title('È¥ÔëºóÐźÅ');% plot(handles.axes2,XC(1:20000);% - 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)global a;global t;global y;global count;%a=EMG3(1:points,2);y=fft(a,20000); %¶ÔÐźŽøÐпìËÙFourier±ä»»fs=2000;N=length(y);mag=abs(y);%ÇóµÃFourier±ä»»ºóµÄÕñ·ùf=(0:N-1)/N*fs; %ƵÂÊÐòÁÐaxes(handles.axes1);plot(f,mag);% plot(handles.axes1,f,mag);%»æÖÆͼÐÎ xlabel('ƵÂÊ');ylabel('·ùÖµ');title('Ô­¼¡µç·ùƵN=20000');if count=2global a2;global t2;global y2;%a=EMG3(1:points,2);y2=fft(a2,20000); %¶ÔÐźŽøÐпìËÙFourier±ä»»fs=2000;N=length(y2);mag=abs(y2);%ÇóµÃFourier±ä»»ºóµÄÕñ·ùf=(0:N-1)/N*fs; %ƵÂÊÐòÁÐaxes(handles.axes2);plot(f,mag); endcount=1;% - 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)global a;global t;% global IR;% global SORH;C L=wavedec(a,3,'db5');cA3=appcoef(C,L,'db5',3);cD1=detcoef(C,L,1);cD2=detcoef(C,L,2);cD3=detcoef(C,L,3);thr1=thselect(cD1,'rigrsure');thr2=thselect(cD2,'rigrsure');thr3=thselect(cD3,'rigrsure');TR=thr1,thr2,thr3;SORH='s'XC,CXC,LXC,PERFO,PERF2=wdencmp('lvd',a,. 'db5',3,TR,SORH);y1=fft(XC,20000);fs=2000;N=length(y1);mag1=abs(y1);f=(0:N-1)/N*fs;axes(handles.axes2);plot(f,mag1);xlabel('ƵÂÊ');ylabel('·ùÖµ');title('È¥Ôëºó·ùƵN=20000');% - 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)global a;global t;global y;global count;fs=2000;N=length(y);f=(0:N-1)/N*fs;%ƵÂÊÐòÁÐaxes(handles.axes1);plot(f,angle(y);xlabel('ƵÂÊ');ylabel('Ïàλ');title('Ô­¼¡µçÏàƵ');% plot(handles.axes1,f,angle(y);%»æÖÆÏàƵÌØÐÔͼif count=2global a2;global t2;global y2;fs=2000;N=length(y2);f=(0:N-1)/N*fs;%ƵÂÊÐòÁÐaxes(handles.axes2);plot(f,angle(y2);xlabel('ƵÂÊ');ylabel('Ïàλ');title('Ô­¼¡µçÏàƵ');endcount=1;% plot(handles.axes1,f,angle(y);%»æÖÆÏàƵÌØÐÔͼ% - 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)global a;global t;C L=wavedec(a,3,'db5');cA3=appcoef(C,L,'db5',3);cD1=detcoef(C,L,1);cD2=detcoef(C,L,2);cD3=detcoef(C,L,3);thr1=thselect(cD1,'rigrsure');thr2=thselect(cD2,'rigrsure');thr3=thselect(cD3,'rigrsure');TR=thr1,thr2,thr3;SORH='s'XC,CXC,LXC,PERFO,PERF2=wdencmp('lvd',a,. 'db5',3,TR,SORH);y1=fft(XC,20000);fs=2000;N=length(y1);f=(0:N-1)/N*fs;axes(handles.axes2);plot(f,angle(y1);xlabel('ƵÂÊ');ylabel('Ïàλ');title('È¥Ôëºó¼¡µçÏàƵ');% - 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)try delete(allchild(handles.axes1); delete(allchild(handles.axes2); set(handles.edit1,'string',''); set(handles.edit1,'string',''); set(handles.edit3,'string',''); set(handles.edit4,'string',''); set(handles.edit5,'string',''); set(handles.edit6,'string','');end% - 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)global a;global t;global s;y=fft(a,20000);fs=2000;N=length(y);mag=abs(y);f=(0:N-1)/N*fs;power1=(mag.2)/20000;axes(handles.axes1);plot(f,power1);xlabel('ƵÂÊ');ylabel('¹¦ÂÊÆ×');title('Ô­¼¡µç¹¦ÂÊÆ×');global count;global a2;global t2;global s2;if count=2y2=fft(a2,20000);fs=2000;N=length(y2);mag=abs(y2);f=(0:N-1)/N*fs;power1=(mag.2)/20000;axes(handles.axes2);plot(f,power1);xlabel('ƵÂÊ');ylabel('¹¦ÂÊÆ×');title('Ô­¼¡µç¹¦ÂÊÆ×');endcount=1;% - 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)global a;global t;global s;s=fft(a,2000);C L=wavedec(a,3,'db5');cA3=appcoef(C,L,'db5',3);cD1=detcoef(C,L,1);cD2=detcoef(C,L,2);cD3=detcoef(C,L,3);thr1=thselect(cD1,'rigrsure');thr2=thselect(cD2,'rigrsure');thr3=thselect(cD3,'rigrsure');TR=thr1,thr2,thr3;SORH='s'XC,CXC,LXC,PERFO,PERF2=wdencmp('lvd',a,. 'db5',3,TR,SORH);y1=fft(XC,20000);fs=2000;N=length(y1);mag=abs(y1);f=(0:N-1)/N*fs;power1=(mag.2)/20000;%axes(handles.axes2);plot(f,power1);xlabel('ƵÂÊ');ylabel('¹¦ÂÊÆ×');title('È¥Ôëºó¼¡µç¹¦ÂÊÆ×');% - Executes on button press in pushbutton10.function pushbutton10_Callback(hObject, eventdata, handles)% hObject handle to pushbutton10 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)%Çó¾ùÖµglobal a;set(handles.edit1,'string',mean(a);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_CreateF(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 CreateFs called% Hint: edit controls usually have a white background on Windows.% See ISPC and PUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor') set(hObject,'BackgroundColor','white');end% - Executes on button press in pushbutton11.function pushbutton11_Callback(hObject, eventdata, handles)% hObject handle to pushbutton11 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global a;set(handles.edit3,'string',sqrt(var(a);function edit3_Callback(hObject, eventdata, handles)% hObject handle to edit3 (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 edit3 as text% str2double(get(hObject,'String') returns contents of edit3 as a double% - Executes during object creation, after setting all properties.function edit3_CreateF(hObject, eventdata, handles)% hObject handle to edit3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFs called% Hint: edit controls usually have a white background on Windows.% See ISPC and PUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor') set(hObject,'BackgroundColor','white');end% - Executes on button press in pushbutton12.function pushbutton12_Callback(hObject, eventdata, handles)% hObject handle to pushbutton12 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global a;set(handles.edit4,'string',var(a);function edit4_Callback(hObject, eventdata, handles)% hObject handle to edit4 (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 edit4 as text% str2double(get(hObject,'String') returns contents of edit4 as a double% - Executes during object creation, after setting all properties.function edit4_CreateF(hObject, eventdata, handles)% hObject handle to edit4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFs called% Hint: edit controls usually have a white background on Windows.% See ISPC and PUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor') set(hObject,'BackgroundColor','white');end% - Executes on button press in pushbutton13.function pushbutton13_Callback(hObject, eventdata, handles)% hObject handle to pushbutton13 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)%Çó»ý·Ö¼¡µçÖµIEMGglobal a;set(handles.edit5,'string',mean(abs(a);function edit5_Callback(hObject, eventdata, handles)% hObject handle to edit5 (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 edit5 as text% str2double(get(hObject,'String') returns contents of edit5 as a double% - Executes during object creation, after s

    注意事项

    本文(基于某matlab的肌电信号处理程序.doc)为本站会员(李司机)主动上传,三一办公仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一办公(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    备案号:宁ICP备20000045号-2

    经营许可证:宁B2-20210002

    宁公网安备 64010402000987号

    三一办公
    收起
    展开