Challenge

Project - Data Handling and Interpolation

% reading xls file and storing its value as a table in variable z
z = xlsread('VI.xlsx');
 
V=z(:,1); % assigning 1st column to V
I=z(:,2); % assigning 2nd column to I
V1= -17.3:0.1:0.9; % storing new points as V1
V1 =V1';
I1 = interp1(V,I,V1); % interpolating new I as I1
% yq2 = interp1(x,y,xq,'spline');
figure(1)
plot(V,I,'o',V1,I1,':'); %ploting interpolated value
title('Linear Interpolation')
% figure(2)
% plot(x,y,'o',xq,yq2,':');
% grid;
% title('Spline Interpolation')
z_updated = cat(2,V1,I1);
writematrix(z_updated,'VI_updated.txt','delimiter',',') % writing the interpolated values in a txt file
 
 
 
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.