Challenge

Project - Data Handling and Interpolation

Answer;

data=xlsread("VI.xlsx");
V=data(:,1);
I=data(:,2);
Vq=-17.3:0.1:0.9;
Iq=interp1(V,I,Vq,'linear');
Iq2=interp1(V,I,Vq,'spline');
figure(1)
plot(V,I,Vq,Iq,'r*')
grid on;
title('Linear interpolation');
xlabel('Voltage(V)')
ylabel('Current(A)')
figure(2)
plot(V,I,Vq,Iq2,'m*')
grid on;
title('Spline Interpolation');
xlabel('Voltage(V)')
ylabel('Current(A)')
Z=[Vq' Iq' Iq2']
save ProjectData.mat Z
writematrix(Z,'Project data.txt')
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.