Project - Data Handling and Interpolation
data=xlsread("VI.xlsx");% load the data from the excel file
x = data(:,1);%volatage in column 1
y = data(:,2);%current in column 2
[x,y]=meshgrid(-17.3:0.9,-17.3:0.9);
z=y.*exp(-x.^2-y.^2);
figure (1);
surf(x,y,z)
title('original sampling of V&I')
[xq1,yq1]=meshgrid(-17.3:0.1:0.9,-17.3:0.1:0.9);
zq1=interp2(x,y,z,xq1,yq1);
figure(2);
surf(xq1,yq1,zq1);title("linear interpolation of v&i");
[xq2,yq2]=meshgrid(-17.3:0.1:0.9,-17.3:0.1:0.9);
zq2=interp2(x,y,z,xq2,yq2,'cubic');
figure(3);
surf(xq2,yq2,zq2);
title('cubic interpolation of v&i');


