Project - Data Handling and Interpolation
Data handling and interpolation
command use is interp1 for interpolation
xq1 is text file interpolation
clc;
clearall;
closeall;
fileID = fopen('interpolation.txt','w')
x = ImAmp; % defining a variable x from excel file
y = VVolt; % defining a variable y from excel file
xq = [-17.3:0.1:0.9] % defining the range for interpolation
xq1 = interp1(y,x,xq); % interpolation
figure(1);
plot(x,y,'o',xq,xq1,':'); % plotting the interpolation
grid;
fprintf(fileID,'%f','xq1'); % print output to the text file