%%%Plots a Bland-Altman Plot
%%% var1 and var2 - vectors of the measurements
%%%flag - how much you want to plot
%%% 0 = no plot
%%% 1 = just the data
%%% 2 = data and the difference and CR lines
%%% 3 = above and a linear fit
%%% means = the means of the data
%%% diffs = the raw differences
%%% meanDiff = the mean difference
%%% CR = the 2SD confidence limits
%%% linfit = the paramters for the linear fit
David Cumin (2021). Bland Altman Plot (https://www.mathworks.com/matlabcentral/fileexchange/24645-bland-altman-plot), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!