Challenge

Project - Data Handling and Interpolation

T=xlsread('VI.xlsx');    %to read data from excel file
v=T(:,1);
i=T(:,2);
x=-17.3:0.1:0.9;   %new range for interpolation
yq1=interp1(v,i,x); %linear interpolation
yq2=interp1(v,i,x,'spline');%spline interpolation
figure(1);
plot(v,i,'o',x,yq1,':.');%plot the results
legend('linear interpolation');
xlabel('voltage v');ylabel('current i');
grid;
title('linear interpolation(default)');
figure(2);
plot(v,i,'o',x,yq2,':.');
grid;
title('spline interpolation');
xlabel('voltage v');ylabel('current i');
legend('spline interpolation');
c=[x,yq1,yq2];
writematrix(c,'miss.txt');
 
output:
plot uploaded.
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.