Project - Data Handling and Interpolation
close all;
clear all;
clc;
z=xlsread('VI.xlsx');
V=z(:,1);
I=z(:,2);
xq=[-17.3:0.1:0.9];
yq=interp1(V,I,xq,'spline');
plot(V,I,'O',xq,yq,'r--');
xlabel('voltage v');ylabel('current I');
legend('original one','interpolated one');title('spline interpolation');
save project_29.LxL V I
fid=fopen('project_29.txt','w')
fprintf(fid,'%d\n',yq)
fclose(fid)