Challenge

Project - Data Handling and Interpolation

Lab=xlsread('interpolation')
V=Lab(:,1)
I=Lab(:,2)
x=[-17.3:0.1:0.9];
y=sin(x)
xq=[-17.3:0.01:0.9];
yq1=interp1(x,y,xq);
yq2=interp1(x,y,xq,'spline');
figure(1);
plot(x,y,'o',xq,yq1,':');
title('linear interpolation')
figure(2);
plot(x,y,'o',xq,yq2,':');
grid;
title('spline interpolation');
filename=fopen('mytext.txt','w')
fprintf(filename,'%d\t',x);
fclose(filename);

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.