Challenge

Project - Data Handling and Interpolation

% Read the excel file
[num,txt,raw] = xlsread('VI.xlsx');

% Interpolate the data set
x = -17.3:0.1:0.9;
V = interp1(num(:,1),num(:,2),x);

%Generate the interactive plot
figure;
plot(x,V);
title('Interpolated Voltage vs. Current');
xlabel('Current (A)');
ylabel('Voltage (V)');

%Save the data in text file
fid = fopen('VI_data.txt','wt');
fprintf(fid,'Current\tVoltage\n');
for i=1:length(x)
fprintf(fid,'%f\t%f\n',x(i),V(i));
end

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.