Challenge

Project - Data Handling and Interpolation

project:-
%% first ploting of V VS I graph by importing data from execl sheet
FID=xlsread('VI.xlsx');%opening of excel shhet
V=FID(:,1);%storing value present in all rows and first coloumn
I=FID(:,2);%storing value present in all rows and second coloumn
Z=-17.3:.1:.9;%interpolation in the range of -17.3:0.1:0.9
Y=interp1(V,I,Z,"linear");%performing interpolation and storing in Y
figure(1);%Giving name to plotting as figure 1
plot(V,I,'o',Z,Y,'*');%using plot function to plot first V VS I with o and Z vs Y with *
grid on;%grid on plot
title('VOLTAGE VS CURRENT');%title on plot
xlabel('voltage');% x-axis name
ylabel('current');% y-axis name
grid on;
%% storing of data in txt file by calculating from interpolation
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];%given value
II=interp1(V,I,VV,"linear");% II IS INTERPOLATING W.R.T V AND I TO CONSIDERING VV
X=[VV II]% STORING THE VALUE OF VV AND II in matrix form
store=fopen('VV_VS_II.txt','w');%using fopen function to store the value in txt file by giving write (w) permission
fprintf(store,'%6s%12s\n','VV','II');%first print VV and II
fprintf(store,'%6.2f%12.2f\n',X);%then print Z
fclose(store);%closing of file
print(figure(1),'-djpeg');
%saving graph as jpeg 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.