Project - Data Handling and Interpolation
ANS
% read data from xlsx file
A = xlsread('VI.xlsx');
v= A(:,1); % read 1 column and all row data
i= A(:,2); % read 2 column and all row data
xq= -17.3:0.1:0.9;
yq= interp1(v,i,xq);
plot(v,i,'o',xq,yq,':.');
xlabel('voltage(V)');ylabel('current(I)');
%find the current
%VV =[-17.2 -17.1 -13.8 -13.5 -13.0 -12.5 -11 -9 -5.76 -6 -1 0.11 0.25 0.5 0.61]
%find corresponding current values
i1=interp1(v,i,-17.2); i2=interp1(v,i,-17.1); i3=interp1(v,i,-13.8); i4=interp1(v,i,-13.5);
i5=interp1(v,i,-13); i6=interp1(v,i,-12.5); i7=interp1(v,i,-11); i8=interp1(v,i,-9);
i9=interp1(v,i,-5.76); i10=interp1(v,i,-6); i11=interp1(v,i,-1); i12=interp1(v,i,0.11);
i13=interp1(v,i,0.25); i14=interp1(v,i,0.5); i15=interp1(v,i,0.61);
cal_current=('[i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15]');
disp(cal_current)

