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);