Solving a linear ODE with along with an unknown constant.
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Debugging and Improving Code in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!