Project - Data Handling and Interpolation
Code:
clear;
% Read date from VI in table format
T = readtable('C:\Users\Siddhant\Desktop\Temp\VI.csv');
T.Properties.VariableNames = ["Volt_V","Current_Amp"];
Volt_datapoint = [-17.3:0.1:0.9];
%interpolating data
I_1 = interp1(T.Volt_V,T.Current_Amp,Volt_datapoint,"spline");
plot(T.Volt_V,T.Current_Amp,'o',Volt_datapoint,I_1,':.');
legend('Original','Interpolated');
xlabel('Volt');ylabel('Current');
title('Project - Data Handling and Interpolation');
% Storing data in table format
Interpolated_Data = table(Volt_datapoint',I_1','VariableNames',{'Volt_V','Current_Amp'});
% Publishing table to text format
writetable(Interpolated_Data,'Interpolated_Data.txt','Delimiter','\t','WriteRowNames',true);
Ans:

Please find attached files: