Project - Data Handling and Interpolation
Here I’m using the command ‘Interp1’for Interpolation. The output is saved in the text file called VI.
Code for the project:
fileID=fopen('VI.txt','w'); % defining a variable x from excel file.
x = ImAmp; % defining a variable y from excel file.
y = VVolt; % defining the range for interpolation.
xq = [-1703:0.1:0.9]; % interpolation.
xq1 = interp1(y,x,xq);
figure;
plot(x,y,'-',xq,xq1,'o'); % plotting the interpolation.
>> grid;
>> fprintf(fileID,'%f','xq1'); % print the output xq1 to the text file.