Challenge

Project - Data Handling and Interpolation

data = xlsread('VI','A2:B25');
V = data(:,1); % import data from xlsx file given by question
I = data(:,2);
hold on
VInt = -17.3:0.1:0.9 % Vint for interpilation
VI = interp1(V,I,VInt)
eq1 = polyfit(V,I,2)
V2 = 1:1:24;
I2 = polyval(eq1,V2,'p')
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]% argument for write data form of voltage
I3 = polyval(eq1,VV,'c*') % current for writing in text file
data1 = [VV;I3]
data_write = fopen('writeVI.txt','w'); % write data in text file voltage/current
fprintf(data_write,'VoltAmp %f\n',data1);
plot(V,I,':',V,I2,'g--',VV,I3,'r--o',VInt,VI,'b*');
legend('read value','2nd ord current eqn','write text');
xlabel('Voltage'); ylabel('Current')
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.