Project - Data Handling and Interpolation
%using 'xlsread' to read the data from the excel sheet
a = xlsread('project_matlab.xlsx');
x = a(:,1);
y = a(:,2);
% Range for interpolation
xq = -17.3:0.1:0.9;
% using 'interp1' to find the missing data
yq = interp1(x,y,xq);
% plotting the original and interpolated data
plot(x,y,'o',xq,yq,'g:.');
% labeling and annotating
xlabel('x-axis(voltage)');ylabel('y-axis(current)');
legend('original data','interpolated data');
title('Interpolation of data');
% writing the data to a text file
fid = fopen('interpolated_data.txt','w');
len = length(yq);
for i = 1:len
fprintf(fid,'%f\n',yq(i));
end
fclose(fid);


THANKING YOU SIR/MAM
NAGISETTY.VINAY PRASAD