Challenge

Project - Data Handling and Interpolation

MATLAB CODES:

[data]=xlsread('matlab_project.xlsx','sheet','A2:B25');

V = data(:,1);

I = data(:,2);

x = (-17.3:0.1:0.9);

y = interp1(V,I,x,"linear");

plot(V,I,"r:*",x,y,"b--");grid;hold;

xlabel('voltage');ylabel('current');

legend('before interpolation','after interpolation of volt Amp');

title('interpolation of excel data');

save('v.txt','V','I','-ascii');

fileID = fopen('v.txt','w');

fprintf(fileID,'%6s%12s rn','V','I');

fprintf(fileID,%6.2f %12.8frn',y);

fclose(fileID);

     V            I
-28.00 -26.00000000
-24.00 -19.00000000
-16.50 -14.00000000
-12.33 -10.66666667
 -9.00  -8.40000000
 -7.80  -7.20000000
 -6.60  -6.00000000
 -5.80  -5.60000000
 -5.40  -5.20000000
 -5.00  -4.80000000
 -4.60  -4.40000000
 -4.20  -4.00000000
 -3.90  -3.80000000
 -3.70  -3.60000000
 -3.50  -3.40000000
 -3.30  -3.20000000
 -3.10  -3.00000000
 -2.95  -2.90000000
 -2.85  -2.80000000
 -2.75  -2.70000000
 -2.65  -2.60000000
 -2.55  -2.50000000
 -2.45  -2.40000000
 -2.35  -2.30000000
 -2.25  -2.20000000
 -2.15  -2.10000000
 -2.05  -2.00000000
 -1.97  -1.93000000
 -1.89  -1.86000000
 -1.82  -1.79000000
 -1.76  -1.72000000
 -1.69  -1.65000000
 -1.62  -1.58000000
 -1.54  -1.51000000
 -1.48  -1.44000000
 -1.41  -1.37000000
 -1.34  -1.30000000
 -1.29  -1.27000000
 -1.25  -1.24000000
 -1.23  -1.21000000
 -1.20  -1.18000000
 -1.17  -1.15000000
 -1.14  -1.12000000
 -1.11  -1.09000000
 -1.07  -1.06000000
 -1.05  -1.03000000
 -1.01  -1.00000000
 -0.99  -0.97333333
 -0.96  -0.94666667
 -0.93  -0.92000000
 -0.91  -0.89333333
 -0.88  -0.86666667
 -0.85  -0.84000000
 -0.83  -0.81333333
 -0.80  -0.78666667
 -0.77  -0.76000000
 -0.75  -0.73333333
 -0.72  -0.70666667
 -0.69  -0.68000000
 -0.67  -0.65333333
 -0.64  -0.62666667
 -0.61  -0.60000000
 -0.59  -0.58000000
 -0.57  -0.56000000
 -0.55  -0.54000000
 -0.53  -0.52000000
 -0.51  -0.50000000
 -0.49  -0.48000000
 -0.47  -0.46000000
 -0.45  -0.44000000
 -0.43  -0.42000000
 -0.41  -0.40000000
 -0.39  -0.38000000
 -0.37  -0.36000000
 -0.35  -0.34000000
 -0.33  -0.32000000
 -0.31  -0.30000000
 -0.29  -0.27777778
 -0.27  -0.25555556
 -0.24  -0.23333333
 -0.22  -0.21111111
 -0.20  -0.18888889
 -0.18  -0.16666667
 -0.16  -0.14444444
 -0.13  -0.12222222
 -0.11  -0.10000000
 -0.07  -0.03103448
  0.00   0.00000000
  0.00   0.01500000
  0.17   1.23000000
   NaN          NaN
   NaN 
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.