Challenge

Project - Data Handling and Interpolation

1) reading xls file
VI=xlsread('VI.xlsx'); %Read the xlsx file and store in VI matrix
V=VI(:,1); %V as column 1 of VI matrix
I=VI(:,2); %I as column 2 of VI matrix
plot(V,I,'o'); %plot data points V & I
hold;
xlabel('Voltage(V)');
ylabel('Current(I)');
title('Voltage vs current');
2)interpolation range
V1=(-17.3:0.1:0.9);
I1=interp1(V,I,V1,'spline');
plot(V1,I1,':.');
legend('Original Data','Spline Interpolation');
3)Finding the current values
VV =[-17.2 -17.1 -13.8 -13.5 -13.0 -12.5 -11 -9 -5.76 -6 -1 0.11 0.25 0.5 0.61];
aa = interp1(V,I,VV,"linear");
z = [VV; aa];
fileID = fopen('Current.txt','w');
fprintf(fileID,'%3f %6f\n',z);
fclose(fileID);
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.