data1 = [0.66, 0.73, 0.79, 0.80, 0.81, 0.89, 0.94, 0.95, 0.96, 0.99, 1.03, 1.09, 1.09, 1.10, 1.10, 1.14, 1.15, 1.22, 1.27, 1.29];
data2 = [1.66, 1.67, 1.78, 1.79, 1.91, 1.91, 1.98, 1.99, 2.00, 2.02, 2.05, 2.11, 2.12, 2.18, 2.20, 2.23, 2.26, 2.28, 2.33, 2.35];
sorted1 = sort(data1);
sorted2 = sort(data2);
for i = 1:1:20
cdf(i) = i/21;
end
plot(sorted1,cdf,'ko-');
hold on
plot(sorted2,cdf,'ro-');
xlabel('Data (units)', 'FontSize', 16)
ylabel('Cumulative distribution function', 'FontSize', 16)
axis('tight')
set(gca,'FontSize',16)
To embed this project on your website, copy the following code and paste it into your website's HTML: