Hi! I'm new to Matlab and I currently have the following problem:

Ta = 20;

syms T(t);

ODE = diff(T,t) == -k*(T-Ta);

cond_1 = T(0) == 29.5;

cond_2 = T(2) == 23.5;

ODE_sol(t) = dsolve(ODE, cond_1, cond_2);

I'd like to define 'k' as a constant that's unknown until I solve for the ODE with the 2 boundary conditions, and 'syms k' doesn't seem to work. Thanks in advance.

## Best Answer