Challenge

Project - Data Handling and Interpolation

ANSWER FOR PROJECT 

close all;%to close all
clear all;
clc;
z=xlsread('VI.xlsx');%for reading the data from xls file of VI
V=z(:,1);% to read the first column of excel file
I=z(:,2);% to read the second column of excel file
xq=[-17.3:0.1:0.9];% given interval of data
yq=interp1(V,I,xq,'spline');%interpolation of values of V& I using spline
plot(V,I,'o',xq,yq,'g--');% for plotting
xlabel('Voltage V');ylabel('Current I');% for x and y labelling
legend('original one','interpolated one');title('spline interpolation');
save project_29.txt V I % for saving project_29.mat file
fid=fopen('project_29.txt','w')%to open and write in project_29.txt
fprintf(fid, '%3d\n',yq)
fclose(fid)

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.