Project - Data Handling and Interpolation
interplotation_proj.mx
+
clear:
2- 23
4
10-
11
12-
13-
14-
interpolation of voltage and current data
reading excel file data
D=xlsread('VI");
v-D (:,1); voltage data seperating i=D(:,2); current data seperating
xq-1-17.3:0.1:0.9]; Given interpolation range
yql=interpl (v, i, xq); linear interpolation
yq2=interpl (v, i, xq, 'spline'); spline interpolation
Linear interpolation plotting
figure (1)
plot (v, i, 's', xq, yql,':');
title('Linear Interpolation");
xlabel('Voltage (V));
ylabel('Current (I)'); legend('Actual Value', 'Interpolated value', 'location', 'Northeast');
grid on:
* spline interpolation plotting
figure (2)
plot (v, i, 's', xq, yq2, 'b: "); 21-
title('SPLINE INTERPOLATION"); 22- 23-
xlabel('Voltage (V)');
ylabel('Current (1)');
legend('Actual Value', 'Interpolated value', 'location', 'Northeast');