Challenge

Project - Data Handling and Interpolation

m=xlsread('data.xlsx');
vi= -17.3:0.1:0.9;
voltage=m(:,1);
current=m(:,2);
J=interp1(voltage,current,vi); %interp1 to find the values of underlying function
plot(voltage,current,'+');
hold; % to hold the current command
plot(vi,J,':')
file=fopen('interpolation.txt','w'); %fopen opens the file filename for read access
fprintf(file,'%f\n',J); %fprintf Write formatted data to text file
fclose(file); %fclose closes the file associated with file identifier

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.