Challenge

Project - Data Handling and Interpolation

File=xlsread('VI.xlsx'); %With the help of xlsread read th file and import data in File varible
format compact % make compact Format
V=File(:,1); % V in fist colum
I=File(:,2); % I in second Colum
x=-17:3.0:0.9; % new interplolation data
y=interp1(V,I,x,"spline"); %Interpolted data with method spline
plot(x,y,'o--',V,I,'m--') % Plot the both orginal data and intepoltetd data
grid on;
xlabel('volatge');
ylabel('current');
title('voltage vs Current')
print('inter','-dpdf') %Create PDF of graph
%% Given Data Store In VV varbile
VV=[-17.2
-17.1
-13.8
-13.5
-13.0
-12.5
-11
-9
-5.76
-6
-1
0.11
0.25
0.5
0.61]
II=interp1(V,I,VV); %Interplote with orignnal Data V I
Z=[VV II]; %New data store in Varbile Z
Fid=fopen('vvii.txt','w'); %craete New file with Name vvii.txt
fprintf(Fid,'%6s %12s\n ','VV','II'); %Store data
fprintf(Fid,'%6.2f %12.8f\n',Z) %Store data
fclose(Fid) %close the file
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.