Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

??? Error using ==> movie

19 views
Skip to first unread message

Frank Chen

unread,
Oct 4, 2008, 9:19:01 AM10/4/08
to
hi, i have created a movie and the computation is fine (but extremely slow), but after the computation, it stopped about half way and an error appeared:

??? Error using ==> movie
Could not create movie frame

Error in ==> rtani_1 at 40
movie(Z,1);

Here is my code, it is about a helicopter with slung-load, and x0 is a simulation results from Dynamic equations (has 1001 length), and my code creates 1000 frames, it takes extremely long time to compute it, does anyone have any idea to reduce the computing time? also how to avoid that error? By the way, it is fine for movie2avi, again, it takes few mins to do it, so how to reduce the time?

x = [0 3; 3 3.5; 3.5 3.5; 3.5 3; 3 1.6; 1.6 1.6; 1.6 5.5; 5.5 5.51; 5.51 -2.49; -2.49 -2.5; -2.5 1.4; 1.4 1.4; 1.4 0; 0 -0.5; -0.5 -3.5; -3.5 -3.6; -3.6 -4.5; -4.5 -4.5; -4.5 -3.6; -3.6 -3.5; -3.5 -0.5; -0.5 0];

y = [500 500; 500 501; 501 502; 502 503; 503 503; 503 503.35; 503.35 503.1; 503.1 503.3; 503.3 503.8; 503.8 503.6; 503.6 503.35; 503.35 503; 503 503; 503 502; 502 501.8; 501.8 502.5; 502.5 502.5; 502.5 500.5; 500.5 500.5; 500.5 501.2; 501.2 501; 501 500];

a = [3.5 2; 2 2; 2 3; 3 3.5];
b = [502 502; 502 503; 503 503; 503 502];
c = [1.5 3; 3 0; 0 1.5];
d = [500 495; 495 495; 495 500];
i = [1.5 3; 3 3; 3 0; 0 0; 0 1.5];
j = [495 495; 495 493; 493 493; 493 495; 495 495];

for k = 1:length(x0)
h1 =fill(x+x0(k,1),y,'b',a+x0(k,1),b,'r');
h2 = fill(c+x0(k,1),d,'white',i+x0(k,1),j,'black');
center = [1.5+x0(k,1) 500 0];
rotate(h2,[0 0 1],x0(k,3)/pi*180,center);

axis([-5 100 470 508]);
Z(:,k) = getframe;
set(h1,'EraseMode','xor');
set(h2,'EraseMode','xor');

end
movie(Z,1);

Walter Roberson

unread,
Oct 5, 2008, 3:54:39 PM10/5/08
to
Frank Chen wrote:
> hi, i have created a movie and the computation is fine (but extremely slow), but
> after the computation, it stopped about half way and an error appeared:

> ??? Error using ==> movie
> Could not create movie frame

> Error in ==> rtani_1 at 40
> movie(Z,1);

My first suspicion would be that you are running out of memory.

0 new messages