Challenge

Project - Data Handling and Interpolation

volt1=xlsread('VI.xlsx','A2:A25');
%reads voltage data
amp1=xlsread('VI.xlsx','B2:B25');
%reads current data
subplot(221);
plot(volt1,amp1);
%plots original V vs I graph
legend('original plot');
volt2=-17.3:0.1:0.9;
amp2=interp1(volt1,amp1,volt2);
%interpolate amp2 to volt2 with respect to volt1 and amp1
subplot(222);
plot(volt2,amp2,'g--');
legend('interpolated for given condition');
volt3=xlsread('VI.xlsx','Sheet2','A1:A11');
%scans for the missing data i.e. current values
amp3=interp1(volt1,amp1,volt3);
%interpolate amp3 to volt3 with respect to volt1 and amp1
subplot(223);
plot(volt3,amp3,':.');
legend('interpolated for missing data');
fid=fopen('amp3.txt','w');
%creates an output file to store the result
for i=1:length(volt3);
fprintf(fid,'%d,\t%d\n',volt3(i),amp3(i));
end
fclose(fid);
save('Figure 1');
file:electric_project.m
output text file:amp3
figures:Figure 1.mat
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.