Challenge

Project - Data Handling and Interpolation

Matlab code:

A = xlsread('VI.xlsx'); % data is read from excel file
V = A(:,1); % Voltage data is taken from excel file
I = A(:,2); % Current data is taken from excel file
x = [-17.3:0.1:0.9]; % Interpolation range is selected
y = interp1(V,I,x,"spline") %1D interpolation is don for current values within given range
writematrix(y,'Interpolated_data.txt') % Interpolated data is written in text file
plot(V,I,'o',x,y,'-g') % V-I curve is plotted for normal and interpolated data
grid;
title('V-I Cureve Interpolation') %title is given to the curve
xlabel('Voltage(V)') % x and y labels are provided
ylabel('Current(mA)')
legend('Lab Values','Interpolated data') % Legend is added to the curve
gtext('Cut in voltage') % Threshold value of V-I char is shown on graph
Command window output :

>> project1

y =

Columns 1 through 13

-28.0000 -28.1734 -24.0000 -19.0000 -15.8685 -14.0000 -12.2353 -10.5022 -9.0000 -7.8806 -7.1062 -6.5915 -6.2512

Columns 14 through 26

-6.0000 -5.7670 -5.5389 -5.3164 -5.1007 -4.8926 -4.6931 -4.5031 -4.3236 -4.1556 -4.0000 -3.8574 -3.7271

Columns 27 through 39

-3.6080 -3.4991 -3.3993 -3.3076 -3.2228 -3.1440 -3.0701 -3.0000 -2.9328 -2.8682 -2.8061 -2.7464 -2.6889

Columns 40 through 52

-2.6334 -2.5799 -2.5282 -2.4782 -2.4298 -2.3827 -2.3369 -2.2922 -2.2486 -2.2058 -2.1637 -2.1222 -2.0812

Columns 53 through 65

-2.0405 -2.0000 -1.9596 -1.9193 -1.8792 -1.8394 -1.7999 -1.7608 -1.7223 -1.6843 -1.6469 -1.6103 -1.5745

Columns 66 through 78

-1.5395 -1.5055 -1.4725 -1.4406 -1.4099 -1.3804 -1.3522 -1.3253 -1.3000 -1.2762 -1.2538 -1.2327 -1.2130

Columns 79 through 91

-1.1944 -1.1770 -1.1605 -1.1450 -1.1304 -1.1164 -1.1032 -1.0906 -1.0784 -1.0667 -1.0552 -1.0441 -1.0330

Columns 92 through 104

-1.0221 -1.0111 -1.0000 -0.9887 -0.9773 -0.9656 -0.9538 -0.9418 -0.9297 -0.9174 -0.9049 -0.8923 -0.8795

Columns 105 through 117

-0.8665 -0.8535 -0.8403 -0.8269 -0.8135 -0.7999 -0.7862 -0.7724 -0.7585 -0.7445 -0.7304 -0.7162 -0.7019

Columns 118 through 130

-0.6876 -0.6731 -0.6586 -0.6441 -0.6294 -0.6147 -0.6000 -0.5852 -0.5704 -0.5557 -0.5409 -0.5263 -0.5119

Columns 131 through 143

-0.4976 -0.4835 -0.4696 -0.4561 -0.4428 -0.4299 -0.4174 -0.4054 -0.3937 -0.3826 -0.3721 -0.3621 -0.3527

Columns 144 through 156

-0.3439 -0.3359 -0.3285 -0.3219 -0.3161 -0.3112 -0.3070 -0.3038 -0.3016 -0.3003 -0.3000 -0.3007 -0.3021

Columns 157 through 169

-0.3037 -0.3052 -0.3062 -0.3064 -0.3053 -0.3026 -0.2978 -0.2906 -0.2806 -0.2674 -0.2507 -0.2300 -0.2050

Columns 170 through 182

-0.1752 -0.1404 -0.1000 -0.0559 -0.0182 0.0007 -0.0002 0.0002 0.0129 0.1700 1.2300 10.0433 39.0701

Column 183

Interpolated data is saved in text file attached in attachments

***************************************XXXXX***************************************************

101.1102

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.