Challenge

Project 1 - Data Handling and Interpolation

% Read the Excel file

data = xlsread('VI.xlsx');

% Extract voltage and current data

voltage = data(:, 1);

current = data(:, 2);

% Perform interpolation

x = -17.3:0.1:0.9;

interpolated_current = interp1(voltage, current, x, 'linear');

% Generate interactive plot

figure;

plot(voltage, current, 'o', x, interpolated_current);

legend('Original Data', 'Interpolated Data');

xlabel('Voltage');

ylabel('Current');

% Save interpolated data to a text file

interpolated_data = [x', interpolated_current'];

dlmwrite('interpolated_data.txt', interpolated_data, 'delimiter', '\t', 'precision', '%.4f');

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.