expot to excel file
Afficher commentaires plus anciens
I'm looking for some help about what should I do to export to excel file (preferably) all the results from my GUI. I mean the counted parameters and the plots. Can u help me with this?
That's how I'm doing the analysis and this is what I would like to export to excel file:
%handles.R_loc;
%handles.R_valu;
a1=handles.R_loc(1:end-1)/handles.fs;
a2=handles.R_loc(2:end)/handles.fs;
odstepRR=a2-a1;
% meanNN
meanNN=mean(odstepRR);
set(handles.meanNN, 'string', num2str(meanNN*1000));
%minNN
minNN=min(odstepRR);
set(handles.minNN, 'string', num2str(minNN*1000));
%maxNN
maxNN=max(odstepRR);
set(handles.maxNN, 'string', num2str(maxNN*1000));
%HR
hr=60./(odstepRR./1000);
HR=round(mean(hr))/1000;
set(handles.hr, 'string', num2str(HR));
% SDNN
SDNN=std(odstepRR);
set(handles.sdnn,'string',num2str(SDNN*1000)); % mnozymy przez 1000 bo jest w ms
% RMSSD
RMSSD=sqrt(sum(((mean(odstepRR)-odstepRR).^2))/length(odstepRR-1));
set(handles.rmssd,'string',num2str(RMSSD*1000)); % mnozymy przez 1000 bo jest w ms
% NN50
o1=odstepRR(1:end-1);
o2=odstepRR(2:end);
roznica_odstepowRR=o2-o1;
ss=zeros(1,length(o2));
ss(abs(roznica_odstepowRR)>0.05)=1;
NN50=sum(ss);
set(handles.nn50,'string',num2str(NN50));
%pNN50
pNN50=NN50/length(odstepRR);
set(handles.pnn50,'string',num2str(pNN50*100)); % * 100 bo mają być %
%Poincare plot
xp=odstepRR;
xp(end)=[];
xm=odstepRR;
xm(1)=[];
%SD1
SD1 = std(xp-xm)/sqrt(2);
set(handles.sd1, 'string', num2str(SD1*1000));
%SD2
SD2 = std(xp+xm)/sqrt(2);
set(handles.sd2, 'string', num2str(SD2*1000));
%SDRR
SDRR=sqrt(SD1^2+SD2^2)/sqrt(2);
set(handles.sdrr, 'string', num2str(SDRR*1000));
axes(handles.axes4);
set(handles.text44, 'visible', 'on')
plot(xm,xp,'.')
psdest = dspdata.psd(odstepRR, 'Fs',400);
TP = avgpower(psdest,[0.0 0.4]);
set(handles.tp, 'string', num2str(TP));
ULF = avgpower(psdest, [0.0 0.0033]);
set(handles.ulf, 'string', num2str(ULF));
VLF = avgpower(psdest, [0.0033 0.04]);
set(handles.vlf, 'string', num2str(VLF));
LF = avgpower(psdest, [0.04 0.15]);
set(handles.lf, 'string', num2str(LF));
HF = avgpower(psdest, [0.15 0.4]);
set(handles.hf, 'string', num2str(HF));
LFHF = LF/HF;
set(handles.lf_hf, 'string', num2str(LFHF));
axes(handles.axes5);
set(handles.text45, 'visible', 'on')
set(handles.axes5, 'visible', 'on')
plot(psdest)
%plot(freq,10*log10(psdest));
grid on;
guidata(hObject, handles);
Réponse acceptée
Plus de réponses (1)
kyioshi hyb
le 8 Déc 2012
0 votes
Hi,
Where did you get the handles function? Im a litle lost but i need to calculate the parameters for ECG signal and i dont know how
1 commentaire
Image Analyst
le 10 Déc 2012
It's created when you develop a GUI with GUIDE.
Catégories
En savoir plus sur Spreadsheets dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!