How do i use ode23 if i have a spline function?
이전 댓글 표시
I am working on a program in which we must use ode23 to solve Newton's Law of Cooling where k is a changing value interpolated a a specific time in a data table of tvalues and k values. I have used cubic splines to get k-values but now i need to solve the differential equation dT/dt = k(T-Ta). I am given T and Ta as well. I have written for the spline,
xx = linspace(1, tf);
pp = spline(t,k);
yy = ppval(pp,xx);
what do i need to plug in to get a plottable solution with ode23?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Interpolation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!