Challenge

Project - Data Handling and Interpolation

PROJECT:

ANSWER:

MATLAB CODE:

clc
clear all
close all
data = readmatrix("VI.xlsx")%given readmatrix command to read the given values
V= data(:,1);               %voltage value according to the given sheet
I= data(:,2);                %Ivalues in the given sheet
xq = -17.3:0.1:0.9;          %range
plot(V,I,'r+')               %plotting of xq,y1
hold on
y1 = interp1(V,I,xq);        %using interpolation command
plot(xq,y1,"b*")             %plotting of xq,y1
filename = fopen("project.txt",'w') %saving file in text file
fprintf(filename, '%f\n',y1);
fclose(filename);

RESULT:

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.