Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: want to save internal data from ode45 - is this true?
Replies: 1   Last Post: Dec 9, 2012 2:29 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
text-dude

Posts: 74
Registered: 4/30/08
Re: want to save internal data from ode45 - is this true?
Posted: Dec 9, 2012 2:29 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 12/09/2012 08:25 AM, someone wrote:
> I want to save internal data from ode45, but NOT from the intermediate
> timesteps (only the full timestep).
>
> I found this:
> http://www.mathworks.co.uk/matlabcentral/newsreader/view_thread/246590
>
> And tried to implement it - but I think it's wrong.
>
> If the last line(s) of the mass-matrix is zero, the ode45-solver will
> not even solve it.
>
> Am I right? Isn't there any way of only solving the whole (full)
> timestep internal values of ode45?


This is what I'm referring to:

----------
dx(1)/dt = f1(t,x(1),x(2))
dx(2)/dt = f2(t,x(1),x(2))
y = f3(t,x(1),x(2)).

Then define a problem of dimension 3,
set the mass matrix to
[1,0,0; 0,1,0; 0,0,0] (rows are seperated by ;)
and the system to
dx(1) = f1(t,x(1),x(2))
dx(2) = f2(t,x(1),x(2))
dx(3) = x(3) - f3(t,x(1),x(2))

Often it is essential that the initial condition
you provide for y are consistent, i.e. set exactly
x(3) (t=0) = f3(t=0,x(1)(t=0),x(2)(t=0)).
----------

I don't think this should work, with zeros in the last row of the
mass-matrix. Am I right?




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2013. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.