Challenge

Project - Data Handling and Interpolation

>> matrix=xlsread('VI.xlsx'); % experiment result of voltage and current
>> x=[0:pi/4:2*pi];
>> y=sin(x);
>> xq=[-17.3:0.1:0.9]; %given interpolation range
>> yq1=interp1(x,y,xq);
>> yq2=interp1(x,y,xq,'spline');
>> figure(1);

>> plot(x,y,'o',xq,yq1,':.');
>> grid
>> title('linear interpolation');
>> figure(2);
>> plot(x,y,'o',xq,yq2,':.');
>> grid
>> title('spline');
>> matrix=xlsread('VI.xlsx')

matrix =

1 5
2 20
3 40
4 60

>> fileID = fopen('currentvoltage.txt','w');
fprintf(fileID,'%d\n',currentvoltage);
fclose(fileID);

>> currentvoltage=[A,B];
>> plot(A,B)
>> xlabel('current');
>> ylabel('voltage');
>> title('currentvoltagewaveform');

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.

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.