function varargout = subpart(varargin)
% subpart MATLAB code for subpart.fig
% subpart, by itself, creates a new subpart or raises the existing
% singleton*.
%
% H = subpart returns the handle to a new subpart or the handle to
% the existing singleton*.
%
% subpart('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in subpart.M with the given input arguments.
%
% subpart('Property','Value',...) creates a new subpart or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before subpart_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to subpart_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 subpart
% Last Modified by GUIDE v2.5 19-Jul-2017 13:18:17
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @subpart_OpeningFcn, ...
'gui_OutputFcn', @subpart_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 subpart is made visible.
function subpart_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 subpart (see VARARGIN)
% Choose default command line output for subpart
handles.output = hObject;
Title_img=imresize(imread('title.jpg'),[256 64]);
axes(handles.axm);
imshow(Title_img);
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes subpart wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = subpart_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(handles.dip,'string','Please wait...');pause(0.25);
[filename,pathname]=uigetfile('*.mat','SELECT A FOLDER ');
allsignal1=[];
for i=1:15
data=[];
fullpath=strcat(pathname,'1 (',num2str(i),').mat');
load(fullpath);
[r,c]=size(val);
data=val(1,1:c);
allsignal1{i}=data;
axes(handles.axes2)
plot(data);
xlabel('Intervals of Time');
ylabel('Heart Beat Value');
title(strcat('ECG Signal No. :',num2str(i)));
pause(1);
end
save('signal1','allsignal1');
set(handles.dip,'string','Data Uploaded');
% --- 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)
set(handles.dip,'string','Please wait...');pause(0.25);
load('signal1','allsignal1');
for i=1:numel(allsignal1)
data=[];
data=allsignal1{i};
[q,r,s,qo,ro,so]=PCA_QRS(data);
axes(handles.axes2);cla
cla;
hold on;
plot(q,qo,'g^','linewidth',1);
hold on;
plot(r,ro,'ro','linewidth',1);
hold on;
plot(s,so,'mo','linewidth',1);
legend('Q','R','S');
hold on;
plot(data)
xlabel('Intervals of Time');
ylabel('Heart Beat Value');
title(strcat('ECG Signal No. :',num2str(i)));
pause(1);
bradacardiafeature=[];
for i1=1:numel(ro)
bradacardiafeature(1,i1)=ro(i1);
end
for i1=1:numel(qo)
bradacardiafeature(2,i1)=qo(i1);
end
for i1=1:numel(so)
bradacardiafeature(3,i1)=so(i1);
end
allbradacardiafeature{i}=bradacardiafeature;
allbradacardiafeaturedata{i}=data;
end
save('bd','bradacardiafeature','allbradacardiafeature','allbradacardiafeaturedata')
set(handles.dip,'string','QRS Done for Bradacardia Data');
% --- 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)
% --- 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)
set(handles.dip,'string','Please wait...');pause(0.25);
[filename,pathname]=uigetfile('*.mat','SELECT A FOLDER ');
allsignal1=[];
for i=1:15
data=[];
fullpath=strcat(pathname,'1 (',num2str(i),').mat');
load(fullpath);
[r,c]=size(val);
data=val(1,1:c);
allsignal2{i}=data;
cla;
axes(handles.axes2)
plot(data);
xlabel('Intervals of Time');
ylabel('Heart Beat Value');
title(strcat('ECG Signal No. :',num2str(i)));
pause(1);
end
save('signal2','allsignal2');
set(handles.dip,'string','Data Uploaded');
% --- 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)
set(handles.dip,'string','Please wait...');pause(0.25);
load('signal2','allsignal2');
for i=1:numel(allsignal2)
data=[];
data=allsignal2{i};
[q,r,s,qo,ro,so]=PCA_QRS(data);
axes(handles.axes2);
cla;
axes(handles.axes2)
hold on;
plot(q,qo,'g^','linewidth',1);
hold on;
plot(r,ro,'ro','linewidth',1);
hold on;
plot(s,so,'mo','linewidth',1);
legend('Q','R','S');
hold on;
plot(data)
xlabel('Intervals of Time');
ylabel('Heart Beat Value');
hold on;
title(strcat('ECG Signal No. :',num2str(i)));
pause(1);
for i1=1:numel(ro)
techacardiafeature(1,i1)=ro(i1);
end
for i1=1:numel(qo)
techacardiafeature(2,i1)=qo(i1);
end
for i1=1:numel(so)
techacardiafeature(3,i1)=so(i1);
end
alltechacardiafeature{i}=techacardiafeature;
alltechacardiafeaturedata{i}=data;
end
save('td','alltechacardiafeature','techacardiafeature','alltechacardiafeaturedata')
set(handles.dip,'string','QRS Done for Techacardia Data');
% --- 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)
% --- Executes on button press in pushbutton15.
function pushbutton15_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton15 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.dip,'string','Please wait...');pause(0.25);
load GAdataB
load GAdataT
Training_set=[GABD GATD];
Training_set=reshape(Training_set,1,[]);
for i=1:numel(Training_set)
if i==numel(GABD)
Target(i)=1;
else
Target(i)=2;
end
end
net=newff(T
没有合适的资源?快使用搜索试试~ 我知道了~
Final Aman ECG Code Work.rar_ECG_The Signal_amooq_combination499
共67个文件
mat:56个
m:7个
fig:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 87 浏览量
2022-07-14
19:26:46
上传
评论
收藏 749KB RAR 举报
温馨提示
This code is designed for the diseases classification using ECG signal
资源推荐
资源详情
资源评论
收起资源包目录
Final Aman ECG Code Work.rar (67个子文件)
run_me.fig 21KB
subpart.asv 14KB
title.jpg 10KB
Training Database
BRADACARDIA
1 (1).mat 14KB
1 (13).mat 14KB
1 (6).mat 14KB
1 (8).mat 14KB
1 (7).mat 14KB
1 (15).mat 14KB
1 (11).mat 14KB
1 (10).mat 14KB
1 (12).mat 14KB
1 (3).mat 14KB
1 (9).mat 14KB
1 (4).mat 14KB
1 (2).mat 14KB
1 (5).mat 14KB
1 (14).mat 14KB
TECHACARDIA
1 (1).mat 31KB
1 (13).mat 31KB
1 (6).mat 31KB
1 (8).mat 31KB
1 (7).mat 31KB
1 (15).mat 31KB
1 (11).mat 31KB
1 (10).mat 31KB
1 (12).mat 31KB
1 (3).mat 31KB
1 (9).mat 31KB
1 (4).mat 31KB
1 (2).mat 31KB
1 (5).mat 31KB
1 (14).mat 31KB
simulate.m 802B
fitness_fn.m 171B
subpart.m 14KB
GAdataTst.mat 208B
testsignal.mat 2KB
td.mat 60KB
Trainingdata.mat 6KB
signal2.mat 47KB
Test Database
T (8).mat 31KB
T (14).mat 10KB
T (11).mat 10KB
T (15).mat 10KB
T (13).mat 10KB
T (9).mat 31KB
T (6).mat 31KB
T (1).mat 14KB
T (2).mat 14KB
T (7).mat 31KB
T (5).mat 14KB
T (10).mat 31KB
T (3).mat 14KB
T (4).mat 14KB
T (12).mat 10KB
PCA_QRS.m 2KB
GAdataB.mat 1KB
PopFunction.m 151B
GAdataT.mat 246B
run_me.m 4KB
parameters.m 642B
subpart.fig 47KB
bd.mat 215KB
signal1.mat 55KB
testfeature.mat 3KB
parameters.mat 218B
共 67 条
- 1
资源评论
寒泊
- 粉丝: 75
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功