P=[328 636 961 1299 1644 1968 2286 2595 2913 3237 3566 3898 4222 4542 4868 5176 5506 5830 6159 6458 6772 7078 7399 7721 8041 8347 8660 8960 9256 9565 9884 10210 10530 10830 11120 11410 11690 11990 12270 12560 12850 13120 13400 13680 13970 14270 14580 14870 15140 15410 15700 15990 16290 16590 16890 17190 17480 17760 18040 18330 18620 18920 19210 19500 19800 20110 20420 20750 21100 21440 21750 22060 22390 22720 23060 23390 23710 24030 24340 24660 24970 25310 25640]; % 26250 % 26580 % 27240 % 27560 % 27880]; R=[368 683 1006 1338 1692 2020 2324 2641 2953 3284 3610 3941 4266 4590 4909 5223 5552 5877 6207 6511 6814 7125 7445 7767 8087 8396 8701 9008 9305 9608 9926 10260 10570 10870 11170 11450 11730 12020 12320 12600 12880 13160 13430 13720 14000 14310 14620 14900 15180 15460 15740 16030 16320 16640 16930 17230 17510 17800 18080 18380 18670 18960 19250 19540 19840 20150 20470 20800 21140 21480 21790 22110 22430 22760 23110 23440 23750 24070 24380 24700 25010 25350 25680]; % 26290 % 26610 % 27290 % 27600 % 27920]; v=[]; for i=2:length(P) PR=R(i)-P(i); for j=1:length(PR) v=[v,PR]; end end PR0101=v+13; PR0101=PR0101'; PR=v; figure(1) plot(PR/360) m=mean(PR0101); PRV101= PR0101-m; w=[]; for i=2:length(PR0101) PRV1=PR0101(i)-PR0101(i-1); for j=1:length(PRV1) w=[w,PRV1]; end end PRV1=w; PRV1=PRV1'; v1=[]; for i=2:length(P) PP=P(i)-P(i-1); for j=1:length(PP) v1=[v1,PP]; end end PP=v1'; PP=PP'; %plot(PP) HRV= PP- mean(PP); % w1=[]; % for i=2:length(PP) % HRV=PP(i)-PP(i-1); % % for j=1:length(HRV) % % w1=[w1,HRV]; % end % end %HRV=w1; %HRV=HRV'; % plot(HRV) % figure(2) % plot(PP), hold on, plot(PR,'r'),hold on, plot(HRV,'-.'), hold on, plot(PRV,'.') % %PRV1=PR-mean(PR); % figure(3) figure(2) plot(PR0101/360), %hold on, plot(PRV1,'r') RR= PP; figure(3) plot(RR/360)