Challenge

Project - Data Handling and Interpolation

Data Interpolation:- it is the method to find the new data point based on discrite known set of data point.

way of data interpolatin:-

(1) one dimension data interpolation:- let y=f(x) ; then we can find value of y for any value of x is known as one dimension data interpolatin (interp1) it is also known as linear interpolatin

ynew=interp1(x,y,xnew,method)

(2) two dimension data interpolatin:- let z=f(x,y) ; we find znew at any (x1,y1) is know as two dimension data interpolatin

znew=interp2(x,y,z,xnew,ynew,method)

three dimension interpolatin:-let v=f(x,y,z) ; we find vnew at any (x1,y1,z1) is known as three dimension interpolatin

vnew=interp3(x,y,z,v,xnew,ynew,znew,method)

spline interpolatin:-one dimension interpolatin that use cubic splines to find the values

clc
clear
close all
%reading data from excel
a=xlsread("VI (1).xlsx");
v=a(:,1);
i=a(:,2);
% interpolation linear
k=-17.3:0.1:0.9;
l=interp1(v,i,k);
% spline method m
m=interp1(v,i,k,'spline');
% computing current n for the given vv voltage data
vv=[-17.2 -13 -11 -9 -6 -1 0.11 0.25 0.5 0.61 0.66];
n=interp1(v,i,vv);
% ploted the v vs i
subplot(2,2,1);
plot(v,i,'o','LineWidth',2);
grid on
axis([-18 2 -30 5]);
xlabel('voltage v volt');
ylabel('current I ampare');
title('v vs i data')
% spline interpolation
subplot(2,2,3);
plot(v,i,'o',k,m,'g');
grid on
axis([-18 2 -30 5])
xlabel('voltage v volt');
ylabel('current i ampair');
title('v vs i splain interpolatin')
% liner interpolatin
subplot(2,2,2);
plot(v,i,'o',k,l,'g');
grid on
axis([-18 2 -30 5]);
xlabel('volatage v volt');
ylabel('current I ampair');
title('v vs i linear interpolation')
end
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.