V=[3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, 5, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6];
I=[0.079, 0.085, 0.085, 0.094, 0.094, 0.097, 0.095, 0.097, 0.098, 0.109, 0.106, 0.109, 0.112, 0.115, 0.119, 0.123, 0.121, 0.122, 0.132, 0.132, 0.131, 0.131, 0.136, 0.140, 0.141, 0.149, 0.151, 0.147, 0.152, 0.157];
p = polyfit(V,I,1);
plot(V,polyval(p,V), 'r-');
hold on;
plot(V,I,'ko');
h = legend ('numerical fit', 'Data', 'location', 'southeast');
set (h, "fontsize", 16);
xlabel('V (V)', 'FontSize', 16)
ylabel('I (A)', '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: