Solving a linear ODE with along with an unknown constant.
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Equation Solving en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!