% Data file to learn to interpolate

% Two vectors x and y are given.
% Goal is to interpolate for intermediate values

x = 1:1:10;
y =[1     4    10    16    25    39    49    64    83   100];

% Make a plot

plot(x,y)
xlabel('Independent Variable')
ylabel('Dependent Variable')
grid

% Interpolate for the value of x = 1.45

yValue = interp1(x,y,5.4);

disp(['The interpolated value of y is  ', num2str(yValue)])


