Skip to content
Snippets Groups Projects
Commit 18fb549f authored by Kajsa Tunedal's avatar Kajsa Tunedal
Browse files

modified figures after revision

parent fedcd2a4
Branches
Tags
No related merge requests found
...@@ -129,9 +129,9 @@ exp.PV.sem = exp.PV.eRand; ...@@ -129,9 +129,9 @@ exp.PV.sem = exp.PV.eRand;
% Data-based parameters % Data-based parameters
exp.parameters.Caa.eRand = simulatedDataTrue.parameters.Caa.mean.*0.15; % 15% error exp.parameters.Caa.eRand = simulatedDataTrue.parameters.Caa.mean.*0.15; % 15% error
exp.parameters.ELCo.eRand = simulatedDataTrue.parameters.ELCo.mean.*0.12; % 12% error exp.parameters.ELCo.eRand = simulatedDataTrue.parameters.ELCo.mean.*0.12; % 12% error
exp.parameters.Ctot.eRand = simulatedDataTrue.parameters.Ctot.mean.*0.20; % 25%, calculated from other variables exp.parameters.Ctot.eRand = simulatedDataTrue.parameters.Ctot.mean.*0.20; % calculated from other variables
exp.parameters.Rtot.eRand = simulatedDataTrue.parameters.Rtot.mean.*0.082; % 12%, calculated from other variables exp.parameters.Rtot.eRand = simulatedDataTrue.parameters.Rtot.mean.*0.082; % calculated from other variables
exp.parameters.Emax_LV.eRand = simulatedDataTrue.parameters.Emax_LV.mean.*0.077; % 10%, calculated from other variables exp.parameters.Emax_LV.eRand = simulatedDataTrue.parameters.Emax_LV.mean.*0.077; % calculated from other variables
exp.parameters.Caa.eSyst = 0; % no systematic errors exp.parameters.Caa.eSyst = 0; % no systematic errors
exp.parameters.ELCo.eSyst = 0; % no systematic errors exp.parameters.ELCo.eSyst = 0; % no systematic errors
......
...@@ -59,16 +59,16 @@ for n = 1:length(experimentNames) ...@@ -59,16 +59,16 @@ for n = 1:length(experimentNames)
SV_PV_randonly(n) = trapz(datan.MV.time, trueData.PV.mean + e.pv.random); SV_PV_randonly(n) = trapz(datan.MV.time, trueData.PV.mean + e.pv.random);
%add only offset errors and calculate stroke volume %add only offset errors and calculate stroke volume
SV_MV_offsetonly(n) = trapz(datan.MV.time, trueData.MV.mean + e.mv.systematic );%+ e.RR.MV SV_MV_offsetonly(n) = trapz(datan.MV.time, trueData.MV.mean + e.mv.systematic );
SV_AV_offsetonly(n) = trapz(datan.MV.time, trueData.AV.mean + e.av.systematic);% + e.RR.AV SV_AV_offsetonly(n) = trapz(datan.MV.time, trueData.AV.mean + e.av.systematic);
SV_AA_offsetonly(n) = trapz(datan.MV.time, trueData.AA.mean + e.aa.systematic);% + e.RR.AA SV_AA_offsetonly(n) = trapz(datan.MV.time, trueData.AA.mean + e.aa.systematic);
SV_PV_offsetonly(n) = trapz(datan.MV.time, trueData.PV.mean + e.pv.systematic);% + e.RR.PV SV_PV_offsetonly(n) = trapz(datan.MV.time, trueData.PV.mean + e.pv.systematic);
%add only systematic errors and calculate stroke volume %add only systematic errors and calculate stroke volume
SV_MV_systonly(n) = trapz(datan.MV.time, trueData.MV.mean + e.mv.systematic + e.RR.MV);% SV_MV_systonly(n) = trapz(datan.MV.time, trueData.MV.mean + e.mv.systematic + e.RR.MV);
SV_AV_systonly(n) = trapz(datan.MV.time, trueData.AV.mean + e.av.systematic + e.RR.AV);% SV_AV_systonly(n) = trapz(datan.MV.time, trueData.AV.mean + e.av.systematic + e.RR.AV);
SV_AA_systonly(n) = trapz(datan.MV.time, trueData.AA.mean + e.aa.systematic + e.RR.AA);% SV_AA_systonly(n) = trapz(datan.MV.time, trueData.AA.mean + e.aa.systematic + e.RR.AA);
SV_PV_systonly(n) = trapz(datan.MV.time, trueData.PV.mean + e.pv.systematic + e.RR.PV);% SV_PV_systonly(n) = trapz(datan.MV.time, trueData.PV.mean + e.pv.systematic + e.RR.PV);
end end
ctot_meanerr = mean(Ctoterr); ctot_meanerr = mean(Ctoterr);
...@@ -167,7 +167,7 @@ for f = 1:2 ...@@ -167,7 +167,7 @@ for f = 1:2
t=title(letters(letternum),'FontSize',12); t=title(letters(letternum),'FontSize',12);
ax = gca; ax = gca;
ax.TitleHorizontalAlignment = 'left';%TitleFontWeight ax.TitleHorizontalAlignment = 'left';
pos = t.Position; pos = t.Position;
pos(1) = pos(1)-0.125; pos(1) = pos(1)-0.125;
t.Position = pos; t.Position = pos;
...@@ -182,9 +182,9 @@ for f = 1:2 ...@@ -182,9 +182,9 @@ for f = 1:2
[resolutionError,postPrError,smoothingErrorReal,offsetError,allErrors,origFlow,randerrors] = flowerror(f,origflowcurves,origflownames,realRRerrors,rrdata,origTime,trueData); [resolutionError,postPrError,smoothingErrorReal,offsetError,allErrors,origFlow,randerrors] = flowerror(f,origflowcurves,origflownames,realRRerrors,rrdata,origTime,trueData);
% Plot all in one % Plot all in one
RRpos = smoothingErrorReal; RRpos = smoothingErrorReal;
RRpos(RRpos<0) = NaN;%0; RRpos(RRpos<0) = NaN;
RRneg = smoothingErrorReal; RRneg = smoothingErrorReal;
RRneg(RRneg>0) = NaN;%0; RRneg(RRneg>0) = NaN;
nexttile nexttile
hold on hold on
...@@ -330,8 +330,14 @@ for f = 3:4 ...@@ -330,8 +330,14 @@ for f = 3:4
end end
%% stroke volumes %% stroke volumes
nexttile([2 1]) swarmwidth = 0.25;
grey = [0.65 0.65 0.65];
black = [0.05 0.05 0.05];
yellow = [0.5 0.5 0.8];
nexttile
hold on hold on
yline(0,'-');
ylabel('Stroke volume error (%)') ylabel('Stroke volume error (%)')
mverrAbs_syst = SV_MV_systonly-trapz(trueData.MV.time,trueData.MV.mean); mverrAbs_syst = SV_MV_systonly-trapz(trueData.MV.time,trueData.MV.mean);
averrAbs_syst = SV_AV_systonly-trapz(trueData.AV.time,trueData.AV.mean); averrAbs_syst = SV_AV_systonly-trapz(trueData.AV.time,trueData.AV.mean);
...@@ -341,25 +347,24 @@ mverrAbs_systP = 100*mverrAbs_syst./trapz(trueData.MV.time,trueData.MV.mean); ...@@ -341,25 +347,24 @@ mverrAbs_systP = 100*mverrAbs_syst./trapz(trueData.MV.time,trueData.MV.mean);
averrAbs_systP = 100*averrAbs_syst./trapz(trueData.AV.time,trueData.AV.mean); averrAbs_systP = 100*averrAbs_syst./trapz(trueData.AV.time,trueData.AV.mean);
aaerrAbs_systP = 100*aaerrAbs_syst./trapz(trueData.AA.time,trueData.AA.mean); aaerrAbs_systP = 100*aaerrAbs_syst./trapz(trueData.AA.time,trueData.AA.mean);
pverrAbs_systP = 100*pverrAbs_syst./trapz(trueData.PV.time,trueData.PV.mean); pverrAbs_systP = 100*pverrAbs_syst./trapz(trueData.PV.time,trueData.PV.mean);
swarmchart(1.2.*ones(size(mverrAbs_systP)),mverrAbs_systP,2,[0.5 0.5 0],'*','XJitterWidth',0.10) swarmchart((1+swarmwidth).*ones(size(mverrAbs_systP)),mverrAbs_systP,2,yellow,'filled','XJitterWidth',swarmwidth)
swarmchart(2.2.*ones(size(mverrAbs_systP)),averrAbs_systP,2,[0.5 0.5 0],'*','XJitterWidth',0.10) swarmchart((2+swarmwidth).*ones(size(mverrAbs_systP)),averrAbs_systP,2,yellow,'filled','XJitterWidth',swarmwidth)
swarmchart(3.2.*ones(size(mverrAbs_systP)),aaerrAbs_systP,2,[0.5 0.5 0],'*','XJitterWidth',0.10) swarmchart((3+swarmwidth).*ones(size(mverrAbs_systP)),aaerrAbs_systP,2,yellow,'filled','XJitterWidth',swarmwidth)
ss=swarmchart(4.2.*ones(size(mverrAbs_systP)),pverrAbs_systP,2,[0.5 0.5 0],'*','XJitterWidth',0.10); ss=swarmchart((4+swarmwidth).*ones(size(mverrAbs_systP)),pverrAbs_systP,2,yellow,'filled','XJitterWidth',swarmwidth);
mverr = 100*(SV_MV-trapz(trueData.MV.time,trueData.MV.mean))./trapz(trueData.MV.time,trueData.MV.mean); mverr = 100*(SV_MV-trapz(trueData.MV.time,trueData.MV.mean))./trapz(trueData.MV.time,trueData.MV.mean);
averr = 100*(SV_AV-trapz(trueData.AV.time,trueData.AV.mean))./trapz(trueData.AV.time,trueData.AV.mean); averr = 100*(SV_AV-trapz(trueData.AV.time,trueData.AV.mean))./trapz(trueData.AV.time,trueData.AV.mean);
aaerr = 100*(SV_AA-trapz(trueData.AA.time,trueData.AA.mean))./trapz(trueData.AA.time,trueData.AA.mean); aaerr = 100*(SV_AA-trapz(trueData.AA.time,trueData.AA.mean))./trapz(trueData.AA.time,trueData.AA.mean);
pverr = 100*(SV_PV-trapz(trueData.PV.time,trueData.PV.mean))./trapz(trueData.PV.time,trueData.PV.mean); pverr = 100*(SV_PV-trapz(trueData.PV.time,trueData.PV.mean))./trapz(trueData.PV.time,trueData.PV.mean);
s=swarmchart(1.*ones(size(mverr)),mverr,2,[0.5 0.5 1],'*','XJitterWidth',0.10); s=swarmchart(1.*ones(size(mverr)),mverr,2,grey,'filled','XJitterWidth',swarmwidth);
swarmchart(2.*ones(size(mverr)),averr,2,[0.5 0.5 1],'*','XJitterWidth',0.10) swarmchart(2.*ones(size(mverr)),averr,2,grey,'filled','XJitterWidth',swarmwidth)
swarmchart(3.*ones(size(mverr)),aaerr,2,[0.5 0.5 1],'*','XJitterWidth',0.10) swarmchart(3.*ones(size(mverr)),aaerr,2,grey,'filled','XJitterWidth',swarmwidth)
swarmchart(4.*ones(size(mverr)),pverr,2,[0.5 0.5 1],'*','XJitterWidth',0.10) swarmchart(4.*ones(size(mverr)),pverr,2,grey,'filled','XJitterWidth',swarmwidth)
yline(0,'--');
errorbar(1,mean(mverr),std(mverr),'k*','LineWidth',1,'markersize',5) errorbar(1,mean(mverr),std(mverr),'.','color',black,'LineWidth',1,'markersize',5)
errorbar(2,mean(averr),std(averr),'k*','LineWidth',1,'markersize',5) errorbar(2,mean(averr),std(averr),'.','color',black,'LineWidth',1,'markersize',5)
errorbar(3,mean(aaerr),std(aaerr),'k*','LineWidth',1,'markersize',5) errorbar(3,mean(aaerr),std(aaerr),'.','color',black,'LineWidth',1,'markersize',5)
er=errorbar(4,mean(pverr),std(pverr),'k*','LineWidth',1,'markersize',5); er=errorbar(4,mean(pverr),std(pverr),'.','color',black,'LineWidth',1,'markersize',5);
mverrAbs_rand = SV_MV_randonly-trapz(trueData.MV.time,trueData.MV.mean); mverrAbs_rand = SV_MV_randonly-trapz(trueData.MV.time,trueData.MV.mean);
averrAbs_rand = SV_AV_randonly-trapz(trueData.AV.time,trueData.AV.mean); averrAbs_rand = SV_AV_randonly-trapz(trueData.AV.time,trueData.AV.mean);
...@@ -369,17 +374,23 @@ mverrAbs_randP = 100*mverrAbs_rand./trapz(trueData.MV.time,trueData.MV.mean); ...@@ -369,17 +374,23 @@ mverrAbs_randP = 100*mverrAbs_rand./trapz(trueData.MV.time,trueData.MV.mean);
averrAbs_randP = 100*averrAbs_rand./trapz(trueData.AV.time,trueData.AV.mean); averrAbs_randP = 100*averrAbs_rand./trapz(trueData.AV.time,trueData.AV.mean);
aaerrAbs_randP = 100*aaerrAbs_rand./trapz(trueData.AA.time,trueData.AA.mean); aaerrAbs_randP = 100*aaerrAbs_rand./trapz(trueData.AA.time,trueData.AA.mean);
pverrAbs_randP = 100*pverrAbs_rand./trapz(trueData.PV.time,trueData.PV.mean); pverrAbs_randP = 100*pverrAbs_rand./trapz(trueData.PV.time,trueData.PV.mean);
swarmchart(1.4.*ones(size(mverrAbs_randP)),mverrAbs_randP,2,[0.4 0 0.2],'*','XJitterWidth',0.10) swarmchart((1+swarmwidth*2).*ones(size(mverrAbs_randP)),mverrAbs_randP,2,black,'filled','XJitterWidth',swarmwidth)
swarmchart(2.4.*ones(size(mverrAbs_randP)),averrAbs_randP,2,[0.4 0 0.2],'*','XJitterWidth',0.10) swarmchart((2+swarmwidth*2).*ones(size(mverrAbs_randP)),averrAbs_randP,2,black,'filled','XJitterWidth',swarmwidth)
swarmchart(3.4.*ones(size(mverrAbs_randP)),aaerrAbs_randP,2,[0.4 0 0.2],'*','XJitterWidth',0.10) swarmchart((3+swarmwidth*2).*ones(size(mverrAbs_randP)),aaerrAbs_randP,2,black,'filled','XJitterWidth',swarmwidth)
sr=swarmchart(4.4.*ones(size(mverrAbs_randP)),pverrAbs_randP,2,[0.4 0 0.2],'*','XJitterWidth',0.10); sr=swarmchart((4+swarmwidth*2).*ones(size(mverrAbs_randP)),pverrAbs_randP,2,black,'filled','XJitterWidth',swarmwidth);
xticks([1:4]) xticks([1:4]+swarmwidth)
xticklabels({'MV','AV','AA','PV'}) xticklabels({'MV','AV','AA','PV'})
yline(5,'--'); yline(5,'--');
yline(-5,'--'); yline(-5,'--');
xline(2-swarmwidth,':');
xline(3-swarmwidth,':');
xline(4-swarmwidth,':');
set(gca,'FontSize',9) set(gca,'FontSize',9)
xlim([0.5 4.5]) xlim([1-swarmwidth 4+swarmwidth*3])
yticks(-30:10:30)
ylim([-30,30])
t=title('E','FontSize',12); t=title('E','FontSize',12);
ax = gca; ax = gca;
ax.TitleHorizontalAlignment = 'left'; ax.TitleHorizontalAlignment = 'left';
...@@ -387,9 +398,10 @@ pos = t.Position; ...@@ -387,9 +398,10 @@ pos = t.Position;
pos(1) = pos(1)-0.6; pos(1) = pos(1)-0.6;
t.Position = pos; t.Position = pos;
%----
nexttile([2 1]) nexttile%([2 1])
hold on hold on
yline(0,'-');
ylabel('Stroke volume difference (%)') ylabel('Stroke volume difference (%)')
diffMVAV_systonly = 100*(SV_MV_systonly-SV_AV_systonly)./mean([SV_MV_systonly,SV_AV_systonly],2); diffMVAV_systonly = 100*(SV_MV_systonly-SV_AV_systonly)./mean([SV_MV_systonly,SV_AV_systonly],2);
diffMVAA_systonly = 100*(SV_MV_systonly-SV_AA_systonly)./mean([SV_MV_systonly,SV_AA_systonly],2); diffMVAA_systonly = 100*(SV_MV_systonly-SV_AA_systonly)./mean([SV_MV_systonly,SV_AA_systonly],2);
...@@ -397,12 +409,12 @@ diffMVPV_systonly = 100*(SV_MV_systonly-SV_PV_systonly)./mean([SV_MV_systonly,SV ...@@ -397,12 +409,12 @@ diffMVPV_systonly = 100*(SV_MV_systonly-SV_PV_systonly)./mean([SV_MV_systonly,SV
diffAVAA_systonly = 100*(SV_AV_systonly-SV_AA_systonly)./mean([SV_AV_systonly,SV_AA_systonly],2); diffAVAA_systonly = 100*(SV_AV_systonly-SV_AA_systonly)./mean([SV_AV_systonly,SV_AA_systonly],2);
diffAVPV_systonly = 100*(SV_AV_systonly-SV_PV_systonly)./mean([SV_AV_systonly,SV_PV_systonly],2); diffAVPV_systonly = 100*(SV_AV_systonly-SV_PV_systonly)./mean([SV_AV_systonly,SV_PV_systonly],2);
diffAAPV_systonly = 100*(SV_AA_systonly-SV_PV_systonly)./mean([SV_AA_systonly,SV_PV_systonly],2); diffAAPV_systonly = 100*(SV_AA_systonly-SV_PV_systonly)./mean([SV_AA_systonly,SV_PV_systonly],2);
swarmchart(1.2.*ones(size(diffMVAV_systonly)),diffMVAV_systonly,2,[0.5 0.5 0],'*','XJitterWidth',0.10) swarmchart((1+swarmwidth).*ones(size(diffMVAV_systonly)),diffMVAV_systonly,2,yellow,'o','filled','XJitterWidth',swarmwidth)
swarmchart(2.2.*ones(size(diffMVAV_systonly)),diffMVAA_systonly,2,[0.5 0.5 0],'*','XJitterWidth',0.10) swarmchart((2+swarmwidth).*ones(size(diffMVAV_systonly)),diffMVAA_systonly,2,yellow,'o','filled','XJitterWidth',swarmwidth)
swarmchart(3.2.*ones(size(diffMVAV_systonly)),diffMVPV_systonly,2,[0.5 0.5 0],'*','XJitterWidth',0.10) swarmchart((3+swarmwidth).*ones(size(diffMVAV_systonly)),diffMVPV_systonly,2,yellow,'o','filled','XJitterWidth',swarmwidth)
ss=swarmchart(4.2.*ones(size(diffMVAV_systonly)),diffAVAA_systonly,2,[0.5 0.5 0],'*','XJitterWidth',0.10); ss=swarmchart((4+swarmwidth).*ones(size(diffMVAV_systonly)),diffAVAA_systonly,2,yellow,'o','filled','XJitterWidth',swarmwidth);
swarmchart(5.2.*ones(size(diffMVAV_systonly)),diffAVPV_systonly,2,[0.5 0.5 0],'*','XJitterWidth',0.10) swarmchart((5+swarmwidth).*ones(size(diffMVAV_systonly)),diffAVPV_systonly,2,yellow,'o','filled','XJitterWidth',swarmwidth)
swarmchart(6.2.*ones(size(diffMVAV_systonly)),diffAAPV_systonly,2,[0.5 0.5 0],'*','XJitterWidth',0.10) swarmchart((6+swarmwidth).*ones(size(diffMVAV_systonly)),diffAAPV_systonly,2,yellow,'o','filled','XJitterWidth',swarmwidth)
diffMVAV = 100*(SV_MV-SV_AV)./mean([SV_MV,SV_AV],2); diffMVAV = 100*(SV_MV-SV_AV)./mean([SV_MV,SV_AV],2);
diffMVAA = 100*(SV_MV-SV_AA)./mean([SV_MV,SV_AA],2); diffMVAA = 100*(SV_MV-SV_AA)./mean([SV_MV,SV_AA],2);
...@@ -411,19 +423,19 @@ diffAVAA = 100*(SV_AV-SV_AA)./mean([SV_AV,SV_AA],2); ...@@ -411,19 +423,19 @@ diffAVAA = 100*(SV_AV-SV_AA)./mean([SV_AV,SV_AA],2);
diffAVPV = 100*(SV_AV-SV_PV)./mean([SV_AV,SV_PV],2); diffAVPV = 100*(SV_AV-SV_PV)./mean([SV_AV,SV_PV],2);
diffAAPV = 100*(SV_AA-SV_PV)./mean([SV_AA,SV_PV],2); diffAAPV = 100*(SV_AA-SV_PV)./mean([SV_AA,SV_PV],2);
swarmchart(1.*ones(size(SV_MV)),100*(SV_MV-SV_AV)./SV_MV,2,[0.5 0.5 1],'*','XJitterWidth',0.10) swarmchart(1.*ones(size(SV_MV)),100*(SV_MV-SV_AV)./SV_MV,2,grey,'filled','XJitterWidth',swarmwidth)
swarmchart(2.*ones(size(SV_MV)),100*(SV_MV-SV_AA)./SV_MV,2,[0.5 0.5 1],'*','XJitterWidth',0.10) swarmchart(2.*ones(size(SV_MV)),100*(SV_MV-SV_AA)./SV_MV,2,grey,'filled','XJitterWidth',swarmwidth)
swarmchart(3.*ones(size(SV_MV)),100*(SV_MV-SV_PV)./SV_MV,2,[0.5 0.5 1],'*','XJitterWidth',0.10) swarmchart(3.*ones(size(SV_MV)),100*(SV_MV-SV_PV)./SV_MV,2,grey,'filled','XJitterWidth',swarmwidth)
swarmchart(4.*ones(size(SV_MV)), 100*(SV_AV-SV_AA)./SV_AV,2,[0.5 0.5 1],'*','XJitterWidth',0.10) swarmchart(4.*ones(size(SV_MV)), 100*(SV_AV-SV_AA)./SV_AV,2,grey,'filled','XJitterWidth',swarmwidth)
swarmchart(5.*ones(size(SV_MV)), 100*(SV_AV-SV_PV)./SV_AV,2,[0.5 0.5 1],'*','XJitterWidth',0.10) swarmchart(5.*ones(size(SV_MV)), 100*(SV_AV-SV_PV)./SV_AV,2,grey,'filled','XJitterWidth',swarmwidth)
swarmchart(6.*ones(size(SV_MV)), 100*(SV_AA-SV_PV)./SV_AA,2,[0.5 0.5 1],'*','XJitterWidth',0.10) swarmchart(6.*ones(size(SV_MV)), 100*(SV_AA-SV_PV)./SV_AA,2,grey,'filled','XJitterWidth',swarmwidth)
errorbar(1,mean(diffMVAV),std(diffMVAV),'k*','LineWidth',1,'markersize',5) errorbar(1,mean(diffMVAV),std(diffMVAV),'.','color',black,'LineWidth',1,'markersize',5)
errorbar(2,mean(diffMVAA),std(diffMVAA),'k*','LineWidth',1,'markersize',5) errorbar(2,mean(diffMVAA),std(diffMVAA),'.','color',black,'LineWidth',1,'markersize',5)
errorbar(3,mean(diffMVPV),std(diffMVPV),'k*','LineWidth',1,'markersize',5) errorbar(3,mean(diffMVPV),std(diffMVPV),'.','color',black,'LineWidth',1,'markersize',5)
errorbar(4,mean(diffAVAA),std(diffAVAA),'k*','LineWidth',1,'markersize',5) errorbar(4,mean(diffAVAA),std(diffAVAA),'.','color',black,'LineWidth',1,'markersize',5)
errorbar(5,mean(diffAVPV),std(diffAVPV),'k*','LineWidth',1,'markersize',5) errorbar(5,mean(diffAVPV),std(diffAVPV),'.','color',black,'LineWidth',1,'markersize',5)
errorbar(6,mean(diffAAPV),std(diffAAPV),'k*','LineWidth',1,'markersize',5) errorbar(6,mean(diffAAPV),std(diffAAPV),'.','color',black,'LineWidth',1,'markersize',5)
diffMVAV_randonly = 100*(SV_MV_randonly-SV_AV_randonly)./mean([SV_MV_randonly,SV_AV_randonly],2); diffMVAV_randonly = 100*(SV_MV_randonly-SV_AV_randonly)./mean([SV_MV_randonly,SV_AV_randonly],2);
diffMVAA_randonly = 100*(SV_MV_randonly-SV_AA_randonly)./mean([SV_MV_randonly,SV_AA_randonly],2); diffMVAA_randonly = 100*(SV_MV_randonly-SV_AA_randonly)./mean([SV_MV_randonly,SV_AA_randonly],2);
...@@ -431,23 +443,30 @@ diffMVPV_randonly = 100*(SV_MV_randonly-SV_PV_randonly)./mean([SV_MV_randonly,SV ...@@ -431,23 +443,30 @@ diffMVPV_randonly = 100*(SV_MV_randonly-SV_PV_randonly)./mean([SV_MV_randonly,SV
diffAVAA_randonly = 100*(SV_AV_randonly-SV_AA_randonly)./mean([SV_AV_randonly,SV_AA_randonly],2); diffAVAA_randonly = 100*(SV_AV_randonly-SV_AA_randonly)./mean([SV_AV_randonly,SV_AA_randonly],2);
diffAVPV_randonly = 100*(SV_AV_randonly-SV_PV_randonly)./mean([SV_AV_randonly,SV_PV_randonly],2); diffAVPV_randonly = 100*(SV_AV_randonly-SV_PV_randonly)./mean([SV_AV_randonly,SV_PV_randonly],2);
diffAAPV_randonly = 100*(SV_AA_randonly-SV_PV_randonly)./mean([SV_AA_randonly,SV_PV_randonly],2); diffAAPV_randonly = 100*(SV_AA_randonly-SV_PV_randonly)./mean([SV_AA_randonly,SV_PV_randonly],2);
swarmchart(1.4.*ones(size(diffMVAV_randonly)),diffMVAV_randonly,2,[0.4 0 0.2],'*','XJitterWidth',0.10) swarmchart((1+swarmwidth*2).*ones(size(diffMVAV_randonly)),diffMVAV_randonly,2,black,'filled','XJitterWidth',swarmwidth)
swarmchart(2.4.*ones(size(diffMVAV_randonly)),diffMVAA_randonly,2,[0.4 0 0.2],'*','XJitterWidth',0.10) swarmchart((2+swarmwidth*2).*ones(size(diffMVAV_randonly)),diffMVAA_randonly,2,black,'filled','XJitterWidth',swarmwidth)
swarmchart(3.4.*ones(size(diffMVAV_randonly)),diffMVPV_randonly,2,[0.4 0 0.2],'*','XJitterWidth',0.10) swarmchart((3+swarmwidth*2).*ones(size(diffMVAV_randonly)),diffMVPV_randonly,2,black,'filled','XJitterWidth',swarmwidth)
sr=swarmchart(4.4.*ones(size(diffMVAV_randonly)),diffAVAA_randonly,2,[0.4 0 0.2],'*','XJitterWidth',0.10); sr=swarmchart((4+swarmwidth*2).*ones(size(diffMVAV_randonly)),diffAVAA_randonly,2,black,'filled','XJitterWidth',swarmwidth);
swarmchart(5.4.*ones(size(diffMVAV_randonly)),diffAVPV_randonly,2,[0.4 0 0.2],'*','XJitterWidth',0.10) swarmchart((5+swarmwidth*2).*ones(size(diffMVAV_randonly)),diffAVPV_randonly,2,black,'filled','XJitterWidth',swarmwidth)
swarmchart(6.4.*ones(size(diffMVAV_randonly)),diffAAPV_randonly,2,[0.4 0 0.2],'*','XJitterWidth',0.10) swarmchart((6+swarmwidth*2).*ones(size(diffMVAV_randonly)),diffAAPV_randonly,2,black,'filled','XJitterWidth',swarmwidth)
yline(5,'--'); yline(5,'--');
yline(-5,'--'); line = yline(-5,'--');
yline(0,'--'); % yline(0,'--');
xline(2-swarmwidth,':');
xlim([0.5 6.5]) xline(3-swarmwidth,':');
xticks([1:6]) xline(4-swarmwidth,':');
xline(5-swarmwidth,':');
xline(6-swarmwidth,':');
xlim([1-swarmwidth 6+swarmwidth*3])
xticks([1:6]+swarmwidth)
xticklabels({'MV-AV','MV-AA','MV-PV','AV-AA','AV-PV','AA-PV'}) xticklabels({'MV-AV','MV-AA','MV-PV','AV-AA','AV-PV','AA-PV'})
legend([s(1);er;sr(1);ss(1)],{'All errors','Mean+-sd of all','Random error',... yticks(-40:10:40)
'Systematic error'},'location','northoutside','Numcolumns',2,... ylim([-40,40])
'Position',[0.0872432573356074 0.284542914516151 0.4 0.04]) legend([s(1);er;sr(1);ss(1);line],{'All errors','Mean+-sd of all errors','Random errors',...
'Systematic errors','5% error'},'location','northoutside','Numcolumns',2,...
'Position',[0.0461550220414897 0.11602368374692 0.4 0.04])
set(gca,'FontSize',9) set(gca,'FontSize',9)
t=title('F','FontSize',12); t=title('F','FontSize',12);
ax = gca; ax = gca;
......
...@@ -34,7 +34,7 @@ paramNamesPlotNice = {'Caa', 'Rao','m2_L_V','ksystLV','EmaxLA','Cpvc'}; ...@@ -34,7 +34,7 @@ paramNamesPlotNice = {'Caa', 'Rao','m2_L_V','ksystLV','EmaxLA','Cpvc'};
experimentNames = {'E_dataP78','E_dataP1','E_dataP3','E_dataP24','E_dataP36','E_dataP33'}; experimentNames = {'E_dataP78','E_dataP1','E_dataP3','E_dataP24','E_dataP36','E_dataP33'};
plotNames = {'Control 1','Control 2','Control 3','T2D+HT 1','T2D+HT 2','T2D+HT 3'}; plotNames = {'C1','C2','C3','P1','P2','P3'};
units.param = {'ml/mmHg','mmHg*s/ml','mmHg*s/ml','mmHg*s^2/ml','mmHg*s/ml',... units.param = {'ml/mmHg','mmHg*s/ml','mmHg*s/ml','mmHg*s^2/ml','mmHg*s/ml',...
'ml/mmHg','cm^2','ml/mmHg','ml/mmHg','ml/mmHg','ml/mmHg','ml/mmHg',... 'ml/mmHg','cm^2','ml/mmHg','ml/mmHg','ml/mmHg','ml/mmHg','ml/mmHg',...
...@@ -156,7 +156,6 @@ for i = 1:length(paramNamesPlot) ...@@ -156,7 +156,6 @@ for i = 1:length(paramNamesPlot)
end end
if lb(p,e) > ub(p,comp) || ub(p,e) < lb(p,comp) %no overlapping confidence intervals, definetely different between these subjects if lb(p,e) > ub(p,comp) || ub(p,e) < lb(p,comp) %no overlapping confidence intervals, definetely different between these subjects
signp{e,comp} = '**'; signp{e,comp} = '**';
% sign(comp,e) = '**';
elseif middlep > ub(p,comp) || middlep < lb(p,comp) %less than half overlapping, probably different (~ p=0.05) elseif middlep > ub(p,comp) || middlep < lb(p,comp) %less than half overlapping, probably different (~ p=0.05)
signp{e,comp} = '*'; signp{e,comp} = '*';
else % overlapping more than half, probably not different ( ~ p > 0.05) else % overlapping more than half, probably not different ( ~ p > 0.05)
...@@ -168,6 +167,7 @@ for i = 1:length(paramNamesPlot) ...@@ -168,6 +167,7 @@ for i = 1:length(paramNamesPlot)
end end
%% Plot results figure for publication %% Plot results figure for publication
linespace=0.05;
darkpurple = [0.9 0.5 0.9].*0.4; darkpurple = [0.9 0.5 0.9].*0.4;
lightpurple = [1 0.7 1]; lightpurple = [1 0.7 1];
l = length(experimentNames); l = length(experimentNames);
...@@ -177,25 +177,35 @@ letters = 'A':'Z'; ...@@ -177,25 +177,35 @@ letters = 'A':'Z';
figure('Name','Fig7_ProfileLikelihood_clinicalexample') figure('Name','Fig7_ProfileLikelihood_clinicalexample')
set(gcf,'Color','white') set(gcf,'Color','white')
xdim_CM = 17; xdim_CM = 17;
ydim_CM = 12+5+3; ydim_CM = 12+3;
set(gcf,'Units','centimeters','Position',[0 0 xdim_CM ydim_CM]) set(gcf,'Units','centimeters','Position',[0 0 xdim_CM ydim_CM])
set(gcf,'PaperUnits', 'centimeters', 'PaperSize', [xdim_CM, ydim_CM]) set(gcf,'PaperUnits', 'centimeters', 'PaperSize', [xdim_CM, ydim_CM])
tiledlayout(4,6,'TileSpacing','loose','Padding','compact') tiledlayout(3,12,'TileSpacing','loose','Padding','compact')
%example
nexttile([1,3])
axis('off')
% results
for i = 1:length(paramNamesPlot) for i = 1:length(paramNamesPlot)
p = find(ismember(paramNames,paramNamesPlot{i})); p = find(ismember(paramNames,paramNamesPlot{i}));
if i == 4
nexttile([1,3]);
axis('off')
end
ax1=nexttile([1,3]); ax1=nexttile([1,3]);
hold on hold on
ylabel([paramNamesPlotNice{i} ' (' units.param{p} ')']) ylabel([paramNamesPlotNice{i} ' (' units.param{p} ')'])
for e = 1:length(experimentNames) for e = 1:length(experimentNames)
xl=xline(e,':','Color',[0.1 0.1 0.1],'linewidth',0.8);
middlep = lb(p,e)+ ((ub(p,e)-lb(p,e))/2); middlep = lb(p,e)+ ((ub(p,e)-lb(p,e))/2);
sd = (ub(p,e)-middlep) / 1.96; %95% conf interval corresponds to 1.96 sd sd = (ub(p,e)-middlep) / 1.96; %95% conf interval corresponds to 1.96 sd
if e > 3 % patient if e > 3 % patient
errorbar(e,middlep,sd,'.','color',purplegradient(end,:),'linewidth',2) pe=errorbar(e,middlep,sd,'.','color',darkpurple,'linewidth',1.1,'markersize',1);
plot(e,bestparam(e,p),'o','color',purplegradient(end,:),'MarkerFaceColor',purplegradient(end,:),'MarkerSize',3) pb=plot(e,bestparam(e,p),'o','color',darkpurple,'MarkerFaceColor',darkpurple,'MarkerSize',3);
else % control else % control
errorbar(e,middlep,sd,'.','color',purplegradient(1,:),'linewidth',2) ce=errorbar(e,middlep,sd,'.','color',lightpurple.*0.9,'linewidth',1.1,'markersize',1);
plot(e,bestparam(e,p),'o','color',purplegradient(1,:),'MarkerFaceColor',purplegradient(1,:),'MarkerSize',3) cb=plot(e,bestparam(e,p),'o','color',lightpurple.*0.9,'MarkerFaceColor',lightpurple.*0.9,'MarkerSize',3);
end end
end end
xticks(1:length(plotNames)) xticks(1:length(plotNames))
...@@ -215,17 +225,24 @@ for i = 1:length(paramNamesPlot) ...@@ -215,17 +225,24 @@ for i = 1:length(paramNamesPlot)
y1 = min(lb(p,:))*0.95; y1 = min(lb(p,:))*0.95;
end end
yticks([y1 y2]); yticks([y1 y2]);
yd = 0.05*(length(comps)-1) + 1; s=strcmp(sign{i},'**');
numsign = sum(s(:));
yd = linespace*(numsign) + 1 + (linespace*0.9)*length(experimentNames);
ymax = max(ub(p,:))*(yd+0.02)*1.01; ymax = max(ub(p,:))*(yd+0.02)*1.01;
ymax = max(max(ub(p,:))*1.05,ymax); ymax = max(max(ub(p,:))*1.05,ymax);
ylim([min(lb(p,:))*0.95,ymax]) ylim([min(lb(p,:))*0.95,ymax])
%significance %significance
yd=1;
startingc = 1;
for c = 1:length(comps) for c = 1:length(comps)
yd = 0.05*(c-1) + 1;
if strcmp(sign{i}(comps{c}(1),comps{c}(2)),'**') if strcmp(sign{i}(comps{c}(1),comps{c}(2)),'**')
plot(comps{c},[max(ub(p,:))*yd,max(ub(p,:))*yd],'k-') if startingc ~= comps{c}(1)
plot(mean(comps{c}),max(ub(p,:))*(yd+0.02),'k*','markersize',4,'linewidth',0.5) yd = yd+linespace;
end
startingc = comps{c}(1);
yd = yd+linespace;
psign=plot(comps{c},[max(ub(p,:))*yd,max(ub(p,:))*yd],'k-');
end end
end end
set(gca,'FontSize',9,'FontName','Calibri') set(gca,'FontSize',9,'FontName','Calibri')
...@@ -233,33 +250,37 @@ for i = 1:length(paramNamesPlot) ...@@ -233,33 +250,37 @@ for i = 1:length(paramNamesPlot)
ax1.TitleHorizontalAlignment = 'left'; ax1.TitleHorizontalAlignment = 'left';
if i ==1 if i ==1
legend({'Standard deivation (sd)','Best fit to data','No overlapping CI'},'Location','Northwest') legend([xl,cb,ce,pb,pe,psign],...
{sprintf('C: control\nP: HT+T2D'),'Standard deivation (C)','Best fit to data (C)','Standard deivation (P)','Best fit to data (P)','No overlapping CI'},...
'Position',[0.02 0.415931811460952 0.2 0.19],'box','off')
end end
end end
lettersend =i; lettersend =i;
% percent plot % percent plot
green = [0 0.55 0.35]; green = [0 0.55 0.35];
for i = 1:length(paramNamesPlot) for i = 1:length(paramNamesPlot)
p = find(ismember(paramNames,paramNamesPlot{i})); p = find(ismember(paramNames,paramNamesPlot{i}));
ax1=nexttile; ax1=nexttile([1 2]);
hold on hold on
meanbestparam = mean(bestparam(:,p)); meanbestparam = mean(bestparam(:,p));
middlep = lb(p,:)+ ((ub(p,:)-lb(p,:))./2); middlep = lb(p,:)+ ((ub(p,:)-lb(p,:))./2);
sd = (ub(p,:)-middlep) / 1.96; %95% conf interval corresponds to 1.96 sd sd = (ub(p,:)-middlep) / 1.96; %95% conf interval corresponds to 1.96 sd
percP = 100* (sd./meanbestparam ); percP = 100* (sd./meanbestparam );
bar([perc(i),percAll(i)],'FaceColor',green) b1=bar(1,perc(i),'FaceColor',[184 84 184]./255);
errorbar([perc(i),percAll(i)],[std(percP),0],'k.') b2=bar(2,percAll(i),'FaceColor',green);
e1=errorbar([perc(i),percAll(i)],[std(percP),0],'k.');
ylabel(['% of mean ' paramNamesPlotNice{i}]) ylabel(['% of mean ' paramNamesPlotNice{i}])
xticks([1,2]) xticks([])
xticklabels({'Individual sd','Cohort sd'})
set(gca,'FontSize',9,'FontName','Calibri') set(gca,'FontSize',9,'FontName','Calibri')
title(letters(i+lettersend),'FontSize',11,'FontName','Calibri') title(letters(i+lettersend),'FontSize',11,'FontName','Calibri')
ax1.TitleHorizontalAlignment = 'left'; ax1.TitleHorizontalAlignment = 'left';
end end
legend([b1,e1,b2],{sprintf('Individual\nstandard\ndeviation\n '),sprintf('Variation\namong\nindividuals\n '),sprintf('Cohort\nstandard\ndeviation\n ')},'Position',[0.925 0.12 0.05 0.23],'box','off')
%% Save and close all figures %% Save and close all figures
if saveFigs if saveFigs
......
...@@ -222,8 +222,8 @@ darkpurple = [0.9 0.5 0.9].*0.4; ...@@ -222,8 +222,8 @@ darkpurple = [0.9 0.5 0.9].*0.4;
lightpurple = [1 0.7 1]; lightpurple = [1 0.7 1];
purplegradient = [linspace(lightpurple(1),darkpurple(1),l)', linspace(lightpurple(2),darkpurple(2),l)', linspace(lightpurple(3),darkpurple(3),l)']; purplegradient = [linspace(lightpurple(1),darkpurple(1),l)', linspace(lightpurple(2),darkpurple(2),l)', linspace(lightpurple(3),darkpurple(3),l)'];
selectedParamNames = {'k_diast_LA','m2_LV','Caa'}; selectedParamNames = {'Emin_LA','m2_LV','Caa'};
selectedParamNamesPlot = {'k_d_i_a_s_t__L_A','m2_L_V','Caa'}; selectedParamNamesPlot = {'Emin_L_A','m2_L_V','Caa'};
figure('Name',['Fig6_methodevaluation_summary_' experimentName]) figure('Name',['Fig6_methodevaluation_summary_' experimentName])
set(gcf,'Color','white') set(gcf,'Color','white')
xdim_CM = 17; xdim_CM = 17;
...@@ -262,7 +262,7 @@ for i = 1:length(selectedParamNamesPlot) ...@@ -262,7 +262,7 @@ for i = 1:length(selectedParamNamesPlot)
end end
end end
xline(trueData.allParameters(p),'--','LineWidth',1.2,'color',[0 0.5 0]); xline(trueData.allParameters(p),'--','LineWidth',1.2,'color',[0 0.5 0]);
xlabel([paramNamesPlot{ismember(paramNamesPlot,paramNames(p))} ' (value)']) xlabel([selectedParamNamesPlot{ismember(selectedParamNames,paramNames(p))} ' (value)'])
ylabel('Sampled data n.') ylabel('Sampled data n.')
% full PL % full PL
...@@ -283,7 +283,7 @@ for i = 1:length(selectedParamNamesPlot) ...@@ -283,7 +283,7 @@ for i = 1:length(selectedParamNamesPlot)
end end
end end
truep = xline(trueData.allParameters(p),'--','LineWidth',1.2,'color',[0 0.5 0]); truep = xline(trueData.allParameters(p),'--','LineWidth',1.2,'color',[0 0.5 0]);
xlabel([paramNamesPlot{ismember(paramNamesPlot,paramNames(p))} ' (value)']) xlabel([selectedParamNamesPlot{ismember(selectedParamNames,paramNames(p))} ' (value)'])
ylabel('Obj. func value') ylabel('Obj. func value')
end end
legend([okparamp,notokparamp,truep],sprintf('Found true\nvalue'),sprintf('Didn''t find\n true value'),'True value',... legend([okparamp,notokparamp,truep],sprintf('Found true\nvalue'),sprintf('Didn''t find\n true value'),'True value',...
......
...@@ -37,12 +37,12 @@ greenCol = [0 0 0]; ...@@ -37,12 +37,12 @@ greenCol = [0 0 0];
figure('Name',sprintf('True simulated data + %d sampled (%s)',length(estimationData),experimentName)) figure('Name',sprintf('True simulated data + %d sampled (%s)',length(estimationData),experimentName))
set(gcf,'Color','white') set(gcf,'Color','white')
xdim_CM = 17; xdim_CM = 17;
ydim_CM = 17; ydim_CM = 11;
set(gcf,'Units','centimeters','Position',[0 0 xdim_CM ydim_CM]) set(gcf,'Units','centimeters','Position',[0 0 xdim_CM ydim_CM])
set(gcf,'PaperUnits', 'centimeters', 'PaperSize', [xdim_CM, ydim_CM]) set(gcf,'PaperUnits', 'centimeters', 'PaperSize', [xdim_CM, ydim_CM])
tiledlayout(3,6,'TileSpacing','loose','Padding','compact') tiledlayout(4,6,'TileSpacing','compact','Padding','compact')
nexttile([1,3]) nexttile([2,2])
hold on hold on
for i = 1:length(estimationData) for i = 1:length(estimationData)
plot(estimationData{i}.MV.time,estimationData{i}.MV.mean,'.-','color',colors(i,:),'Markersize',12,'LineWidth',1) plot(estimationData{i}.MV.time,estimationData{i}.MV.mean,'.-','color',colors(i,:),'Markersize',12,'LineWidth',1)
...@@ -52,7 +52,7 @@ ylabel('Blood flow in MV (mL/s)') ...@@ -52,7 +52,7 @@ ylabel('Blood flow in MV (mL/s)')
xlabel('Time (s)') xlabel('Time (s)')
tend = trueData.MV.time(end); tend = trueData.MV.time(end);
xlim([0 tend]) xlim([0 tend])
set(gca,'FontSize',10) set(gca,'FontSize',8)
t=title('A','FontSize',12); t=title('A','FontSize',12);
ax = gca; ax = gca;
ax.TitleHorizontalAlignment = 'left'; ax.TitleHorizontalAlignment = 'left';
...@@ -60,7 +60,7 @@ pos = t.Position; ...@@ -60,7 +60,7 @@ pos = t.Position;
pos(1) = pos(1)-0.16; pos(1) = pos(1)-0.16;
t.Position = pos; t.Position = pos;
nexttile([1,3]) nexttile([2,2])
hold on hold on
for i = 1:length(estimationData) for i = 1:length(estimationData)
est(i)=plot(estimationData{i}.AV.time,estimationData{i}.AV.mean,'.-','color',colors(i,:),'Markersize',12,'LineWidth',1); est(i)=plot(estimationData{i}.AV.time,estimationData{i}.AV.mean,'.-','color',colors(i,:),'Markersize',12,'LineWidth',1);
...@@ -70,10 +70,10 @@ ylabel('Blood flow in AV (mL/s)') ...@@ -70,10 +70,10 @@ ylabel('Blood flow in AV (mL/s)')
xlabel('Time (s)') xlabel('Time (s)')
n = split(sprintf('Sampled data %dx',1:length(estimationData)),'x'); n = split(sprintf('Sampled data %dx',1:length(estimationData)),'x');
legend([est,trueplot],[n(1:end-1);{'True data'}], ... legend([est,trueplot],[n(1:end-1);{'True data'}], ...
'Position',[0.75395269610321 0.754276960784314 0.22 0.23]) 'box','off','NumColumns',2,'Position',[0.65 0.798 0.33 0.2])
xlim([0 tend]) xlim([0 tend])
set(gca,'FontSize',10) set(gca,'FontSize',8)
t=title('B','FontSize',12); t=title('B','FontSize',12);
ax = gca; ax = gca;
ax.TitleHorizontalAlignment = 'left'; ax.TitleHorizontalAlignment = 'left';
...@@ -81,16 +81,63 @@ pos = t.Position; ...@@ -81,16 +81,63 @@ pos = t.Position;
pos(1) = pos(1)-0.16; pos(1) = pos(1)-0.16;
t.Position = pos; t.Position = pos;
nexttile([1,3]) nexttile
axis off
nexttile
axis off
%---
letters = {'i','ii','iii','iv','v','vi'};
nexttile
hold on
for i = 1:step:length(estimationData)
plot(1,estimationData{i}.SBP.mean,'.','color',colors(i,:),'linewidth',0.9,'Markersize',14)
plot(2,estimationData{i}.DBP.mean,'.','color',colors(i,:),'linewidth',0.9,'Markersize',14)
end
plot(1,trueData.SBP.mean,'o','color',greenCol,'linewidth',2,'Markersize',5)
plot(2,trueData.DBP.mean,'o','color',greenCol,'linewidth',2,'Markersize',5)
ylabel(sprintf('Blood pressure\n (mmHg)'))
xticks([1,2])
xticklabels({'SBP','DBP'})
xlim([0 3])
set(gca,'FontSize',8)
t=title(letters{1},'FontSize',12);
ax = gca;
ax.TitleHorizontalAlignment = 'left';
pos = t.Position;
pos(1) = pos(1)-0.31;
t.Position = pos;
pnames = fieldnames(trueData.parameters);
p = 1;
nexttile
hold on
for i = 1:length(estimationData)
plot(p,estimationData{i}.parameters.(pnames{p}).mean,'.','color',colors(i,:),'linewidth',1,'Markersize',14)
end
plot(p,trueData.parameters.(pnames{p}).mean,'o','color',greenCol,'linewidth',2,'Markersize',5)
ylabel(pnames{p})
xticks([])
set(gca,'FontSize',8)
t=title(letters(p+1),'FontSize',12);
ax = gca;
ax.TitleHorizontalAlignment = 'left';
pos = t.Position;
pos(1) = pos(1)-1.5;
t.Position = pos;
%---
nexttile([2,2])
hold on hold on
for i = 1:length(estimationData) for i = 1:length(estimationData)
plot(estimationData{i}.AA.time,estimationData{i}.AA.mean,'.-','color',colors(i,:),'Markersize',12,'LineWidth',1) plot(estimationData{i}.AA.time,estimationData{i}.AA.mean,'.-','color',colors(i,:),'Markersize',12,'LineWidth',1)
end end
plot(trueData.AA.time,trueData.AA.mean,'o','color',greenCol,'linewidth',2,'Markersize',5) plot(trueData.AA.time,trueData.AA.mean,'o','color',greenCol,'linewidth',2,'Markersize',5)
ylabel('Blood flow in AA (mL/s)') ylabel('Blood flow in AA (mL/s)')
xlabel('Time (s)') xlabel('Time (s)')
xlim([0 tend]) xlim([0 tend])
set(gca,'FontSize',10) set(gca,'FontSize',8)
t=title('C','FontSize',12); t=title('C','FontSize',12);
ax = gca; ax = gca;
ax.TitleHorizontalAlignment = 'left'; ax.TitleHorizontalAlignment = 'left';
...@@ -98,7 +145,7 @@ pos = t.Position; ...@@ -98,7 +145,7 @@ pos = t.Position;
pos(1) = pos(1)-0.16; pos(1) = pos(1)-0.16;
t.Position = pos; t.Position = pos;
nexttile([1,3]) nexttile([2,2])
hold on hold on
for i = 1:length(estimationData) for i = 1:length(estimationData)
plot(estimationData{i}.PV.time,estimationData{i}.PV.mean,'.-','color',colors(i,:),'Markersize',12,'LineWidth',1) plot(estimationData{i}.PV.time,estimationData{i}.PV.mean,'.-','color',colors(i,:),'Markersize',12,'LineWidth',1)
...@@ -107,7 +154,7 @@ plot(trueData.PV.time,trueData.PV.mean,'o','color',greenCol,'linewidth',2,'Marke ...@@ -107,7 +154,7 @@ plot(trueData.PV.time,trueData.PV.mean,'o','color',greenCol,'linewidth',2,'Marke
ylabel('Blood flow in PV (mL/s)') ylabel('Blood flow in PV (mL/s)')
xlabel('Time (s)') xlabel('Time (s)')
xlim([0 tend]) xlim([0 tend])
set(gca,'FontSize',10) set(gca,'FontSize',8)
t=title('D','FontSize',12); t=title('D','FontSize',12);
ax = gca; ax = gca;
ax.TitleHorizontalAlignment = 'left'; ax.TitleHorizontalAlignment = 'left';
...@@ -116,29 +163,9 @@ pos(1) = pos(1)-0.16; ...@@ -116,29 +163,9 @@ pos(1) = pos(1)-0.16;
t.Position = pos; t.Position = pos;
nexttile %----
hold on
for i = 1:step:length(estimationData)
plot(1,estimationData{i}.SBP.mean,'.','color',colors(i,:),'linewidth',0.9,'Markersize',14)
plot(2,estimationData{i}.DBP.mean,'.','color',colors(i,:),'linewidth',0.9,'Markersize',14)
end
plot(1,trueData.SBP.mean,'o','color',greenCol,'linewidth',2,'Markersize',5)
plot(2,trueData.DBP.mean,'o','color',greenCol,'linewidth',2,'Markersize',5)
ylabel('Blood pressure (mmHg)')
xticks([1,2])
xticklabels({'SBP','DBP'})
xlim([0 3])
set(gca,'FontSize',10)
t=title('E','FontSize',12);
ax = gca;
ax.TitleHorizontalAlignment = 'left';
pos = t.Position;
pos(1) = pos(1)-0.31;
t.Position = pos;
pnames = fieldnames(trueData.parameters); for p = 2:length(pnames)
letters = 'F':'Z';
for p = 1:length(pnames)
nexttile nexttile
hold on hold on
for i = 1:length(estimationData) for i = 1:length(estimationData)
...@@ -147,8 +174,8 @@ for p = 1:length(pnames) ...@@ -147,8 +174,8 @@ for p = 1:length(pnames)
plot(p,trueData.parameters.(pnames{p}).mean,'o','color',greenCol,'linewidth',2,'Markersize',5) plot(p,trueData.parameters.(pnames{p}).mean,'o','color',greenCol,'linewidth',2,'Markersize',5)
ylabel(pnames{p}) ylabel(pnames{p})
xticks([]) xticks([])
set(gca,'FontSize',10) set(gca,'FontSize',8)
t=title(letters(p),'FontSize',12); t=title(letters(p+1),'FontSize',12);
ax = gca; ax = gca;
ax.TitleHorizontalAlignment = 'left'; ax.TitleHorizontalAlignment = 'left';
pos = t.Position; pos = t.Position;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment