Challenge

Project - Data Handling and Interpolation

ans1) data of voltage and current has been recorded in the Matlab program and perform the interpolation in the range of -17.3:0.1:0.9. Generate the interactive plot for the interpolated data and store them in a text file:

load('data.mat');
fileID = fopen('interpolation.txt','w');
x = ans.data(1:24); % defining a variable x from excel file
y = ans.data(25:end); % defining a variable y from excel file
xq = [-17.3:0.1:0.9]; % defining the range for interpolation
xq1 = interp1(x,y,xq,"linear"); % interpolation
figure(1);
plot(x,y,'o',xq,xq1,'-'); % plotting the interpolation
grid;
legend('data','interpolation-linear');
fprintf(fileID,'%f','xq1'); % print the output xq1 to the text 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.