Project - Data Handling and Interpolation
Project :
In a laboratory experiment, data of voltage and current has been recorded and the same is attached in an excel file ( Click on this link VI.xlsx ). Read the excel file in the Matlab program and perform the interpolation in the range of -17.3:0.1:0.9. Generate the interactive plot for the interpolated data and store them in a text file.
num = xlsread('C:\Users\parthibane94\Downloads\parthiban\VI.xlsx');
x=voltage;
v=current;
f=griddedInterpolant(x,v);
xq=-17.3:0.1:0.9;
vq=f(xq);
plot(x,v,'ro')
hold on
plot(xq,vq,'.')
legend('sample points','interpolated points')
xlabel('voltage-V')
ylabel('current-I')
title('Data-Interpolation')
file_ID=fopen('vq.txt','w');
fprintf(file_ID,'%d\n',vq);
file_ID=fopen('xq.txt','w');
fprintf(file_ID,'%d\n',xq);
file_ID=fopen('f.txt','w');
fprintf(file_ID,'%d\n',f);