[fn pn]  = uigetfile('*.TXT', 'Select rr interval file'); 
[ecgt ecg] = textread([pn fn], '%f %f',-1, 'headerlines', 1); 
rr = myecg2hrold(ecgt,ecg); 
figure(4); 
[nt, nv] = hrtach(0, rr*1000, ones(size(rr)), 16); 
myemd(nv,16);