Project - Data Handling and Interpolation
Q-1)
sol:-
clc
clear all
file=xlsread('VI.xlsx')
format compact;
V=file(:,1)
I=file(:,2)
x=-17.3:0.1:0.9;
y=interp1(V,I,x,'spline');
subplot(211);
plot(V,I,'o',x,y)
grid on
title('voltage vs current')
xlabel('voltage')
ylabel('current')
grid on
II=interp1(V,I,VV)
z=[VV II]
fileID = fopen('VVII.txt','w');
fprint(fileID,'%6s %12sn','VV','II');
fprint(fileID,'%6.2f %12.8fn',z);
fclose(fileID);
Graph:-
