Prev: Caliper reading using RS-232 -project help
Next: undefined function error in 2009a, but not in 2009b
From: Heather Moreland on 10 Feb 2010 13:34 Is there a way to have ode15s output the time step it is at as it iterates? I have a simulation that is running for an extremely long time and it would be helpful to be able to see what time step it was on. Thanks, Heather
From: Loren Shure on 10 Feb 2010 14:20 In article <hkuu6s$p9n$1(a)fred.mathworks.com>, heather.moreland(a)gmail.com says... > Is there a way to have ode15s output the time step it is at as it iterates? I have a simulation that is running for an extremely long time and it would be helpful to be able to see what time step it was on. > > Thanks, > Heather > Do what Steve suggests and implement an OutputFcn that will execute each time step. You can then output the time and anything else you want to see. -- Loren http://blogs.mathworks.com/loren http://matlabwiki.mathworks.com/MATLAB_FAQ
From: Heather Moreland on 11 Feb 2010 10:16 I have never used the OutputFcn option before. From what I have read, I have gathered that it requires options=odeset('OutputFcn',@myfun); [T,U]=ode15s(model,[0:dt:tfin],UINIT,options); But I am not sure how to define @myfun so that it outputs each time step. Any assistance would be great appreciated. Loren Shure <loren.shure(a)mathworks.com> wrote in message <MPG.25dcd0f9b05b0f42989ab2(a)news.mathworks.com>... > In article <hkuu6s$p9n$1(a)fred.mathworks.com>, heather.moreland(a)gmail.com > says... > > Is there a way to have ode15s output the time step it is at as it iterates? I have a simulation that is running for an extremely long time and it would be helpful to be able to see what time step it was on. > > > > Thanks, > > Heather > > > > Do what Steve suggests and implement an OutputFcn that will execute each > time step. You can then output the time and anything else you want to > see. > > -- > Loren
From: Steven Lord on 11 Feb 2010 10:43 "Heather Moreland" <heather.moreland(a)gmail.com> wrote in message news:hl16vl$rff$1(a)fred.mathworks.com... >I have never used the OutputFcn option before. From what I have read, I >have gathered that it requires > > options=odeset('OutputFcn',@myfun); > > [T,U]=ode15s(model,[0:dt:tfin],UINIT,options); > > But I am not sure how to define @myfun so that it outputs each time step. > Any assistance would be great appreciated. The documentation I linked in my reply in this thread describes the exact calling signature your myfun function should have and describes what each of the inputs mean. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
From: Heather Moreland on 11 Feb 2010 12:03 I am finding the documentation difficult to decipher in terms of how to define the approprate function myfun. I have create an m-file with function=status=myfun( ) but I am not sure what the arguments should be or how to define them to achieve the desired result. "Steven Lord" <slord(a)mathworks.com> wrote in message <hl18js$far$1(a)fred.mathworks.com>... > > "Heather Moreland" <heather.moreland(a)gmail.com> wrote in message > news:hl16vl$rff$1(a)fred.mathworks.com... > >I have never used the OutputFcn option before. From what I have read, I > >have gathered that it requires > > > > options=odeset('OutputFcn',@myfun); > > > > [T,U]=ode15s(model,[0:dt:tfin],UINIT,options); > > > > But I am not sure how to define @myfun so that it outputs each time step. > > Any assistance would be great appreciated. > > The documentation I linked in my reply in this thread describes the exact > calling signature your myfun function should have and describes what each of > the inputs mean. > > -- > Steve Lord > slord(a)mathworks.com > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ >
|
Next
|
Last
Pages: 1 2 Prev: Caliper reading using RS-232 -project help Next: undefined function error in 2009a, but not in 2009b |