Challenge

Project - Data Handling and Interpolation

data = xlsread("VI.xlsx"); %reading the saved excel file
Volt = data(:,1); %declaring voltage
Amp = data(:,2); %declaring the current
n = [-17.3:0.1:0.9]; %interpolation range
inter = interp1(Volt, Amp, n); %interpolation
plot(Volt,Amp,'o',n,inter,'b-'); % ploting graph of voltage vs temperature
grid;
title('interpolated data');
ylabel('voltage');
xlabel('current');
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];
p = Volt/Amp; %eqating resistance
q = p(:,1); %to store resistance
r = VV/q;
Amp2 = r(:,1); %equating current
fileX = fopen('Voltamp.txt','w'); %storing current
fprintf(fileX, 'Voltage \n'); %creating .txt file
fprintf(fileX, '%f \n',VV); %writing the txt file
fprintf(fileX, '\n Current \n');
fprintf(fileX, '%f \n',Amp2);
fclose(fileX); %closing the .txt file
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.