Project - Data Handling and Interpolation
clc
clear all
file=readtable('vl.xlsv');
format compact
V=file(:,1);
i=file(:,2);
x=-17.3:0.1:0.9;
y=interpl(V,I,x,'spline');
subplot(211);
plot(V,I,'o',x,y);
grid on
title('voltage vs current')
xlabel('voltage');
ylabel('current');
grid on
VV=[-17.2
-13
-11
-9
-6
-1
0.11
0.25
0.5
0.61
0.66];
I=interpl(V,I,VV)
Z=VVI;
fileID=fopen('VVII.txt,'W');
fileprintf(fileID,'%6s%12s\n','W','II');
fprint(fileID,'%6.2f%12.8f\n',Z);
fclose(fileID);
The current value for given voltages below and store them in text file: