Challenge

Project - Data Handling and Interpolation

%Read the excel file in the Matlab program and perform the interpolation
clc;
data=xlsread('VI.xlsx');% file reading
V=data(:,1); %voltage
I=data(:,2); %current
xq=-17.3:0.1:0.9;
yq=interp1(V,I,xq,'spline');
figure(1);
plot(V,I,'o',xq,yq,':.');
grid;
title('voltage vs current');
xlabel('voltage');ylabel('current');grid;
VV=[-17.2 -17.1 -13.8 -13.5 -13.0 -12.5 -11 -9 -5.76 -6 -1 0.11 0.25 0.5 0.61];
II=interp1(V,I,VV);
Z=[VV,II];
fileID=fopen('VVII.txt','w'); % file writing
fprintf(fileID,'%6s %12s\n','VV','II');
fprintf(fileID,'%6.2f %12.8f\n',Z);
fclose(fileID);
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.