clear all;
%ex. 7
close all;
n=15;
fid=fopen("file_07_10.txt","r");

X=[];
s=fgets(fid);
for i=1:n
X=[X,str2num(s)];
s=fgets(fid);
end

Y=[];
s=fgets(fid);
for i=1:n
Y=[Y,str2num(s)];
s=fgets(fid);
end

fclose(fid);

figure();

scatter (X,Y, 225, 'r','.');
gax=gca();
xlabel("Speed (km/h)",'fontsize',16);
ylabel("consumption of fuel (l/100 km)",'rotation',90,'fontsize',16);
title ("Fuel consumption vs. speed",'fontsize',18);


