Challenge

Project - Data Handling and Interpolation

1.

INTERPOLATION

Interpolation of data from -17.3 to 0.9 with intervel of 0.1.

UI=load("C:\Users\DINESH\cube slide\Desktop\VI.txt",'V','I'); % Loading data from the file.
V=UI(:,1);
I=UI(:,2);
x=(-17.3:0.1:0.9);
xq1=interp1(V,I,x,'spline'); % Interpolating using 'interp1' comand.
plot(V,I,'LineWidth',6) % Plotting the raw data using 'plot' comand.
hold
plot(x,xq1,'*') % Plotting the interpolated data using 'plot' comand.
grid
xlabel('Voltage- V')
ylabel('Current- I')
legend('original','interpolated data')
title('INTERPOLATION b/w 17.3 - 0.9 with interval of 0.1')
file = fopen('interpolation_out.txt', 'w'); % Openning new file for output data.
fprintf(file, '%.15f\n', x);
fclose(file);
Graph:

Output

-17.300000000000001
-17.199999999999999
-17.100000000000001
-17.000000000000000
-16.900000000000002
-16.800000000000001
-16.699999999999999
-16.600000000000001
-16.500000000000000
-16.400000000000002
-16.300000000000001
-16.199999999999999
-16.100000000000001
-16.000000000000000
-15.900000000000000
-15.800000000000001
-15.700000000000001
-15.600000000000001
-15.500000000000000
-15.400000000000000
-15.300000000000001
-15.200000000000001
-15.100000000000001
-15.000000000000000
-14.900000000000000
-14.800000000000001
-14.700000000000001
-14.600000000000001
-14.500000000000000
-14.400000000000000
-14.300000000000001
-14.200000000000001
-14.100000000000001
-14.000000000000000
-13.900000000000000
-13.800000000000001
-13.700000000000001
-13.600000000000001
-13.500000000000000
-13.400000000000000
-13.300000000000001
-13.199999999999999
-13.100000000000001
-13.000000000000000
-12.900000000000000
-12.800000000000001
-12.699999999999999
-12.600000000000001
-12.500000000000000
-12.400000000000000
-12.300000000000001
-12.199999999999999
-12.100000000000001
-12.000000000000000
-11.900000000000000
-11.800000000000001
-11.699999999999999
-11.600000000000001
-11.500000000000000
-11.400000000000000
-11.300000000000001
-11.199999999999999
-11.100000000000001
-11.000000000000000
-10.900000000000000
-10.800000000000001
-10.699999999999999
-10.600000000000001
-10.500000000000000
-10.400000000000000
-10.300000000000001
-10.199999999999999
-10.100000000000001
-10.000000000000000
-9.900000000000000
-9.800000000000001
-9.699999999999999
-9.600000000000001
-9.500000000000000
-9.400000000000000
-9.300000000000001
-9.200000000000001
-9.100000000000000
-9.000000000000000
-8.900000000000000
-8.800000000000001
-8.700000000000001
-8.600000000000000
-8.500000000000000
-8.400000000000000
-8.300000000000001
-8.200000000000001
-8.100000000000000
-8.000000000000000
-7.900000000000000
-7.800000000000001
-7.699999999999999
-7.600000000000000
-7.500000000000000
-7.400000000000000
-7.300000000000001
-7.199999999999999
-7.100000000000000
-7.000000000000000
-6.900000000000000
-6.800000000000000
-6.700000000000000
-6.600000000000000
-6.500000000000000
-6.400000000000000
-6.300000000000000
-6.200000000000000
-6.100000000000000
-6.000000000000000
-5.900000000000000
-5.800000000000000
-5.700000000000000
-5.600000000000000
-5.500000000000000
-5.400000000000000
-5.300000000000000
-5.200000000000000
-5.100000000000000
-5.000000000000000
-4.900000000000000
-4.800000000000000
-4.700000000000000
-4.600000000000000
-4.500000000000000
-4.400000000000000
-4.300000000000000
-4.200000000000000
-4.100000000000000
-4.000000000000000
-3.900000000000001
-3.800000000000000
-3.700000000000001
-3.600000000000000
-3.500000000000000
-3.400000000000000
-3.300000000000000
-3.200000000000001
-3.100000000000000
-3.000000000000000
-2.900000000000000
-2.800000000000000
-2.700000000000000
-2.600000000000000
-2.500000000000000
-2.400000000000000
-2.300000000000000
-2.200000000000000
-2.100000000000000
-2.000000000000000
-1.900000000000000
-1.800000000000000
-1.700000000000000
-1.600000000000000
-1.500000000000000
-1.400000000000000
-1.300000000000000
-1.200000000000000
-1.100000000000000
-1.000000000000000
-0.900000000000000
-0.800000000000000
-0.700000000000000
-0.600000000000000
-0.500000000000000
-0.400000000000000
-0.300000000000000
-0.200000000000000
-0.100000000000000
0.000000000000000
0.100000000000000
0.200000000000000
0.300000000000000
0.400000000000000
0.500000000000000
0.600000000000000
0.700000000000000
0.800000000000000
0.900000000000000
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.