The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Matlab-generated animation files not playing
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Kate J.

Posts: 177
Registered: 6/9/11
Matlab-generated animation files not playing
Posted: Feb 7, 2013 10:33 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I have an m-file script that reads in an .out format file and creates an animation from the data. The problem is that, although this output animation file *is* created, each time I try to play the output animation file, I get the error message:

?Your computer is running low on memory. Close other programs and try again.?

Given that I?m only creating small (< 4 MB) animation files, I don?t understand why this error message occurs; I don?t have an excessive number of applications open, and even if close Matlab, I still get the error message above. I?m thinking that there must be something wrong with these animations being generated by my script below; when I generate them on a different computer using the same script, the resultant animations play ok by themselves (i.e. in Windows Media Player), but if I try to insert the animation into a Powerpoint presentation (which is the ultimate intent), the display is extremely choppy, grainy, and otherwise of low quality. There is definitely a problem with the animations that the script below is generating.

My simplified Matlab m-code: (assume that any variable used below has been assigned a valid value)

load data.out;

nFrames = 20;

% Preallocate movie structure.
mov(1:nFrames) = struct('cdata', [],'colormap', []);

k = 1;

for i=startVal:endVal

set(plot(x,y,'b',x,y,'bo', xtarget, ytarget, 'gx'),'LineWidth',3);

targetZone = line(xtarget,ytarget,'LineStyle','none','Marker','o','Color',...

set(text(0.4,0.6,time), 'FontWeight', 'bold', 'FontName', 'Arial', 'Color', [0,0,0]);

myMovie(k) = getframe(gcf);
k = k+1;


movie2avi(myMovie, 'myAnimation.avi', 'compression', 'Indeo3');

Note that in developing the above script, I tested all allowed values for the final argument in the call to movie2avi(); I found that only 2 of them work (?Indeo3? and ?Cinepak?), but since the ?Cinepak?-generated animations were about 2x the size of the ?Indeo3?-generated animations, I decided to use the latter.

Thanks in advance for any insights about what might be wrong with my animation-creation script above, such that the resulting animation .avi files won?t play.

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.