Project - Data Handling and Interpolation
For Linear Interpolation
clear all
clc
A=xlsread('Project_1.xlsx','sheet1','A2:B25');
V=A(:,1);
I=A(:,2);
plot(V,I,'b*');
Vq= -17.3:0.1:0.9
Iq= interp1(V,I,Vq);
hold
plot(Vq,Iq,'r+');
xlabel('Voltage V');
ylabel('Current I(mA)');
title('Linear Interpolation');
For Spline interpolation
clear all
clc
A=xlsread('Project_1.xlsx','sheet1','A2:B25');
V=A(:,1);
I=A(:,2);
plot(V,I,'g*');
Vq= -17.3:0.1:0.9
Iq= interp1(V,I,Vq,'spline');
hold
plot(Vq,Iq,'r*');
xlabel('Voltage V');
ylabel('Current I(mA)');
title('spline Interpolation');