clc
clear
tic
data=csvread('rate and diameter.csv');
x=data(:,2);
y=data(:,1);%rate
x1=2:0.005:7;
dp=3.805;
y1=(dp./x1).*(dp./x1)*0.0475;
yy=y1';
figure
aaa1=scatter(x,y,'MarkerEdgeColor',[0 .5 .5],...
              'MarkerFaceColor',[0 .7 .7],...
              'LineWidth',1.5);hold on;
aaa2=plot(x1,yy','--r','MarkerSize',4,'Linewidth',2.5)
set(gca,'fontname','times new roman','fontSize',22) 

xlabel('Individual APID (cm)','fontname', 'times new roman','fontSize',22)
ylabel('IVD height reduction rate','fontname', 'times new roman','fontSize',22)
legend([aaa1,aaa2],'Actual dataset','Theoretical relationship','fontname', 'times new roman','FontSize',22,'Location','northwest','Orientation','vertical','Box','on')
xlim([2 6.635])
ylim([0 0.6])
toc



