Project - Data Handling and Interpolation
M = readmatrix('VI.xlsx','Sheet','Sheet1'); % read the excel sheet
x = (-17.3:0.1:0.9); % create the value range with intervals
y = interp1(M(:,1), M(:,2), x); % interpolate the values usinf interp1 function
plot(x,y,'b-'); % to create the plot
dlmwrite('interpolated_data.txt', [x', y'], 'delimiter', '\t', 'precision', '%.4f');
% save the data in a text file using the 'dlmwrite'function
missing_data = find(isnan(M)); % find missing values using the 'isnan' function
dlmwrite('missing_data.txt', missing_data, 'delimiter', '\t');
% save the missing data using the 'dlmwrite' function