Challenge

Project - Data Handling and Interpolation

%To read excel file
vol_data = xlsread("VI.xlsx");
%For horizontal view of data
vol_dataH = vol_data';
%Assigning volt and amp values to a variables
volt_V = vol_dataH(1,:);
Amp_I = vol_dataH(2,:);
x = -17.3:0.1:0.9;
c = interp1(volt_V,Amp_I,x,"spline");
%plotting
figure(1)
plot(x,c);
grid;
%interpolation
VV = [-17.2,-17.1,-13.8,-13,-12.5,-11,-9,-5.76,-6,-1,0.11,0.25,0.5,0.61];
current = interp1(volt_V,Amp_I,VV,"spline");
%Storing it in a txt file
fid = fopen('interpolation_output.txt','w');
fprintf(fid, '%g %g\n', [VV(:).'; current(:).']);
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.