Challenge

Project - Data Handling and Interpolation

Code

%data import

voltageVScurrent = readtable('VI.xlsx','PreserveVariableNames',true);

%interpolation

xp1 = -17.3:0.1:0.9;

xp2 = interp1(voltageVScurrent.("V (Volt)"),voltageVScurrent.("I (mAmp)"), xp1);

plot(voltageVScurrent.("V (Volt)"),voltageVScurrent.("I (mAmp)"),'o',xp1,xp2,':');

grid;

%exporting data as text file

fid = fopen('Output.txt','wt');

fprintf(fid,'%.3f\t',xp2);

fclose(fid);

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.