Problem initialising with ODE45
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
Hello all,
I've got a problem with ODE45. Essentially when I call my derivative function "TANKONEDIM", ODE45 doesn't seem to initialise the parameter T (which is a 20 element column vector) and so the simulation falls over. I've checked that all the matrices etc are coming out as the correct size...
Any ideas?
Best
Pete
function [t T] = TankSolver(T0,T,TankGeometry,TankVolume,Outflow,Tamb,Qe);
tspan = [0 3600]; [t T] = ode45(@TANKONEDIM,tspan,T0); end
function dTdt = TANKONEDIM(T,T0,NodeCount,TankVolume,TankGeometry)
global Heat_Matrix
global HeatSources
dTdt = Heat_Matrix*T+HeatSources
end
3 个评论
Walter Roberson
2012-9-17
Why is your TANKONEDIM function expecting NodeCount, TankVolume, TankGeometry to be passed to it? You do not use those parameters and you do not pass them in in the ode45 call.
Peter
2012-9-17
Peter
2012-9-17
回答(0 个)
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!