I have a first order ODE with temperature as the dependent variable. In the equation I have two material properties that change as the temperature changes. I have them stored as arrays. How do I implement these arrays into ODE45?
1 次查看(过去 30 天)
显示 更早的评论
this is my attempt... it did not work at all:
function [comp] = f(t,T)
load('cB_dmag_data.mat','c','d')
dB = 0.1;
cB = c((T-270),(dB/0.1)); dmag = d((T-270),(dB/0.1));
comp = -(1/cB)*dmag*dB*T;
%'c' and 'd' are both arrays that give the value of specific heat and dM/dT at different temperatures and magnetic fields
Any help would be greatly appreciated.
Cheers
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!