Project - Data Handling and Interpolation
In a laboratory experiment, data of voltage and current has been recorded and the same is attached in an excel file ( Click on this link VI.xlsx ). Read the excel file in the Matlab program and perform the interpolation in the range of -17.3:0.1:0.9. Generate the interactive plot for the interpolated data and store them in a text file.
A)
num = readmatrix('VI.xlsx');
x = num(:,1);
y = num(:,2);
x1 = -17:0.1:0.9;
y1 = interp1(x,y,x1,'spline');
figure(1);
plot(x,y,'o',x1,y1,':.')
title('before interpolation');
figure(2);
plot(x1,y1);
title('after interpolation');
save y1.txt