Project - Data Handling and Interpolation
(Q) 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.
clc;
file=xlsread('VI.xlsx'); % (VI.xlsx data is given)
V=file(:,1);
I=file(:,2);
x=-17.3:0.1:0.9; %(Interpolation range is given)
y=interp1(V,I,x,'spline');
plot(V,I,'o',x,y);
xlabel('Voltage');
ylabel('Current');
title('Voltage vs Current');
grid on;
fid=fopen('VI.txt','r');
fclose(fid);