Animations
- From: "George Ellwood" <george_Ellwood@xxxxxxxxxxxxxxxx>
- Date: Fri, 1 Sep 2006 11:17:46 -0400
Hello, I'm having trouble with an animation I've created and wondered
if anyone could help. I've used MATLAB to arrange my data into a
format for a different program. I've created a program to go through
the data and used the image command to produce and image of every 20
rows until it reaches the end. The problem I'm having is with the
..avi file created. I can only open it from the directory it was
created in. If I email it to someone, it won't open and I get this
error message:
0xC00D1199: Cannot play the file from Windows media player
The file type is not supported by the Player. The following table
lists the file types supported by the Player. If the file type you
are trying to play is included in this table, then the file may have
been encoded by using a codec that is not supported by Windows Media
Player. If this is the case, Windows Media Player cannot play the
file.
The file type is supported by the Player, but the file was compressed
by using a codec that is not supported by the Player.
I've not had this trouble before with .avi files I've created,
although these have always used the plot command to make the source
images.
It's very odd, the movie plays fine when opened from the directory it
was created in, and its not like windows media player can't handle
avi files.
I can't see any hidden files or normal files that it might need to
play. I've tried turning the compression off incase its a codec
problem, although this didn't increase the file size.
Any suggestions or ideas? I've included the macro below.
colormap = jet(64);
af=round(aff); % my source matrix made up of yl*zl rows and xl
columns
mov = avifile('check1.avi'); %create movie file
p=image(af(2:(yl+1),2:(xl+1))); %create first image
w=1;
for kk=1:(zl); %for loop to repeat zl number of times
kl=((kk-1)*(yl+1))+1; %used to find the correct space in the matrix
p=image(af((kl+1):(kl+yl-1),2:xl)); %create image
M(w) = getframe(gca);%usual getframe command
mov = addframe(mov,M);%add image to movie
mov = addframe(mov,M);% these two commands were added in again to
space the movie out because it was running too quickly.
mov = addframe(mov,M);
end %close loop
mov = close(mov);% close movie
.
- Prev by Date: Re: converting cell array to number matrix
- Next by Date: Recursive Anonymous Functions
- Previous by thread: Re: Why my MATLAB software always shuts down by it
- Next by thread: Recursive Anonymous Functions
- Index(es):
Relevant Pages
|