Project - Data Handling and Interpolation
>> X=xlsread('VI.xlsx'); %Read the excel file and assigned datas to the X matrix
>> v=X(:,1);% all values of voltage assigned to v
>> i=X(:,2);%all values of current assigned to i
>> plot(v,i);grid;hold; %normal curve plotted asper the given whole data
Current plot held
>> xlabel('Voltage');ylabel('Current');title('V vs I');
>> vq=[-17.3:0.1:0.9];%vq is assigned to interpolate in this range
>> iq=interp1(v,i,vq);
>> plot(v,i,'b-',vq,iq,':.'); %interpolated curve obtained
>> plot(v,i,'b-',vq,iq,'o'); %changed the plot coulr and type to better understandability
>> print('interpolation','-dtxt');
>> M=[vq iq];
>> writematrix(M,"interpolation.txt"); %stored in text file