Challenge

Project - Data Handling and Interpolation

data = xlsread("VI.xlsx"); %excel file read
vol = data(:,1);
cur = data(:,2);
xq = -17.3:0.1:0.9;
xq1 = [-17.2 -13 -11 -9 -6 -1 0.11 0.25 0.5 0.61 0.66]; %new data in excel
yq1 = interp1(vol,cur,xq); %interpolation function
yq2 = interp1(vol,cur,xq1);
figure(1);
plot(vol,cur,'o',xq,yq1,':');
grid;
title('Linear interpolation');
figure(2);
plot(vol,cur,'o',xq1,yq2,'k:');
grid;
title('Linear interpolation new data');
fid = fopen('output.txt','W');
fprintf(fid,'%1f\r\n',yq1);
fclose(fid);
fid = fopen('output1.txt','W');
fprintf(fid,'%1f\r\n',yq2);
fclose(fid);
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.