Solving a linear ODE with along with an unknown constant.
이전 댓글 표시
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.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Equation Solving에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!