Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Creating a movie with varying time steps
Date: Thu, 11 Jun 2009 10:14:57 -0400
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <h0r3g5$rvj$1@fred.mathworks.com>
References: <54d79ffd-aeb6-4244-ac04-445c12c94c06@z7g2000vbh.googlegroups.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1244729669 28659 144.212.105.187 (11 Jun 2009 14:14:29 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 11 Jun 2009 14:14:29 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Xref: news.mathworks.com comp.soft-sys.matlab:546562



"Alexander Erlich" <alexander.erlich@gmail.com> wrote in message 
news:54d79ffd-aeb6-4244-ac04-445c12c94c06@z7g2000vbh.googlegroups.com...
> Hi there,
>
> suppose I have a solution of a differential equation which I would
> like to visualize with surf. The numerical solution tells me exactly
> when to plot the object in which coordinates. Now, I would like to
> create a movie out of these surf plots. I cannot use getframe, as it
> does not enable me to consider the varying time steps. Is there
> another way to do that?

Solve the system of ODEs to generate a solution struct array (using the "sol 
= ..." syntax described in the help rather than the "[t, y] = ..." syntax.) 
Once you have the solution struct, use DEVAL to evaluate the solution at 
equally-spaced time steps.  Then create the movie from the surfaces created 
by the equally-timestep-spaced data.

-- 
Steve Lord
slord@mathworks.com