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 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!