MATLAB: I converted log to linear in part c and it’s giving me error

MATLAB

C_ = log10(C);
figure(2);
semilogy(T,C,'-');
xlabel('time');
ylabel('concentration(mg/L)');
%PART C
t = [17,19,21,23 ];
c = [8.1,4.3,2.3,1.1];% series of data points
cnew = log10(c);
y_1 = interp1(t,c,25,'linear','extrap')
y_2 = interp1(t,c,27,'linear','extrap')
y_3= interp1(t,c,29,'linear','extrap')
c_linear = 10^(cnew)

Best Answer

Replace line:
c_linear = 10^(cnew)
with :
c_linear = 10.^(cnew)