Solving a linear ODE with along with an unknown constant.
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Debugging and Improving Code dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!