Challenge

Project - Data Handling and Interpolation

Project:
clc
data = xlsread('VI.xlsx'); % voltage and current value read from excel file
format compact;
V = data(:,1); % : means all row and 1 means is 1 column
I = data(:,2);
v = -17.3:0.1:0.9;
i = interp1(V,I,v,"linear");
plot(v,i)
xlabel('Voltage');
ylabel('Current');
title('Voltage Vs Current using interpolation');
grid on
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];
ii = interp1(V,I,VV,"linear");
z = [VV; ii];
fileID = fopen('exp.txt','w');
fprintf(fileID,'%3f %6f\n',z);
fclose(fileID);
-17.200000 -26.000000
-17.100000 -24.000000
-13.800000 -2.900000
-13.500000 -2.750000
-13.000000 -2.500000
-12.500000 -2.250000
-11.000000 -1.650000
-9.000000 -1.150000
-5.760000 -0.701333
-6.000000 -0.733333
-1.000000 -0.188889
0.110000 0.000000
0.250000 0.000000
0.500000 0.170000
0.610000 1.610000
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.

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.