Project - Data Handling and Interpolation
clear all
close all
clc
data = xlsread('VI.Xlsx') %opening excel file
V = data(:,1) %reading first coloumn
I = data(:,2) %readimg second coloumn
x = -17.3:0.1:0.9; %defininf range for interpolation
subplot(211)
plot(V,I,'*r')
Y = interp1(V,I,x); %using interpoltian command
subplot(212)
plot(Y,'*y')
figure(2)
plot(V,I,'*r',x,Y,'-y');
fileid = fopen('lab_data.txt','W');
fprintf(fileid,'%8s %13s\n','V(volt)','I(mAmp)');
fprintf(fileid,'%f %f\n',Y);
fclose(fileid);