Project - Data Handling and Interpolation
Ans: project data handling and interpolation
V=readtable("VI.xlsx",'range','a2:a25'); %d read voltage values from xl file
I=readtable("VI.xlsx",'range','b2:b25'); %d read current values from xl file
writetable(V,'voltage.xlsx');% write voltage data in txt
writetable(I,'current.xlsx'); % write current data in txt
Vt=xlsread('voltage.xlsx'); %read data from text in required format
It=xlsread('current.xlsx');%read data from text in required format
xq1=-17.3:0.1:0.9; %d range given
yq1=interp1(Vt,It,xq1); %linear interpolation
yq2=interp1(Vt,It,xq1,'spline'); %d Spline Interpolation
figure(1);
plot(Vt,It,'o',xq1,yq1,':.');grid;
xlabel('voltage');ylabel('current');
title('liner interlopolation')
figure(2);
plot(Vt,It,'o',xq1,yq2,':.');grid;
title('spline interpolation');
label('voltage');ylabel('current');