How do i use ode23 if i have a spline function?
Show older comments
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?
Accepted Answer
More Answers (0)
Categories
Find more on Splines 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!