Project - Data Handling and Interpolation
[V,Ia]=meshgrid(-17.3:0.9,-28:7); %to set Voltage and current range
VI=xlsread('VI.xlsx'); %Read data from Excel file VI
V=VI(:,1); %Voltage matrix
Ia=VI(:,2); %Current matrix
I=pinv(Ia); %Inverting the single row matrix for division in Resistance formula
R=V.*I; %Resistance formula to use for relation
figure(1); surf(V,I,R); %Assigning firgure 1 to Known data plot
xlabel('Voltage');
ylabel('Current');
[Xq,Yq]=meshgrid(-17.3:0.1:0.9,-28:0.19:7); %Putting X and Y limits for interpolation
Vi=interp2(V,Ia,R,Xq,Yq); %Interpolation
figure(2);surf(Xq,Yq,Vi); %Assigning figure 2 for interpolated plot
title('Interpolation');
fid=fopen("Interpolated.txt",'w'); %Opening a text file to input the data
len=length(Vi); %Reading the length matrix Vi
for i=1:len %Running for loop for writting
fprintf(fid,'%d ',Vi(i)); %Writting data
end %Ending the process
fclose(fid); %closing the file

The issue I faced was in the interp2 function which gave an error.
