Having some dramas converting equations to matlab. The code runs but my answers seem wildly out...
Part A uses the formula v=(T^3/2)/a*T+b which i believe translates to V = (T.^3/2)./A.*T+B; in matlab. I think this is right.
Part b uses the formula 1/v=a*(T^-1/2)+b*T^-3/2 which I thought to be in matlab as...
Vtemp = (A2.*TCK.^-1/2)+(B2.*TCK.^-3/2);
V2=1./Vtemp;
Part C runs a formula f(c,t)=(T^3/2)/c(1)*T+c(2) which i am mostly sure is right but not 100%.
TC = [-20 0 20 40 70 100 200 300 400 500]';
vi = [1.63 1.71 1.82 1.87 2.03 2.17 2.53 2.98 3.32 3.64]';
p = polyfit(1./TCK,vi,1);
V = (TCK.^3/2)./A.*TCK+B;
Tspan = linspace(-20,520,10)';
plot(Tspan,V,'bo',Tspan,V,'r-');
title('viscosity polyfit part a')
p2 = polyfit(1./TCK,vi,1);
Vtemp = (A2.*TCK.^-1/2)+(B2.*TCK.^-3/2);
Tspan = linspace(-20,520,10)';
figure; plot(Tspan,V2,'bo',Tspan,V2,'r-');
title('viscosity polyfit part b')
f = @(c,T) T.^3/2./c(1).*T+c(2);
c = nlinfit(TCK,vi,f,c0);
figure; plot(Tspan,V3,'bo',Tspan,V3,'r-');
title('viscosity nlinfit part C')