MATLAB: Simulation using Aero.Animation

MATLABsimulationvideo

hi, I had like to simulate missile trajectory using Aero.Animation. I got a time vector and position vectors for 3DOF.I wrote the next code:
data=[time',zeros(length(time),1),zeros(length(time),1),SOLUTION(1:end,5)];
h=Aero.Animation;
f=figure;
h.Figure=f;
h.initialize();
h.FramesPerSecond=10
h.TimeScaling = 5;
idx1=h.createBody('testrocket.ac','ac');
h.bodies{1}.TimeseriesSourceType='Array3DoF';
h.bodies{1}.timeseriesSource=data;
h.Camera.offset=[-150 -150 0];
h.show()
h.VideoRecord = 'on';
h.VideoQuality = 50;
h.VideoCompression = 'Motion JPEG AVI'
h.VideoFilename = 'missile';
h.play()
h.VideoRecord='off';
where data is my trajectory data [time,x,y,angle].
while playing the simulation i had like to save the video. the file that i get is usually only few kb and it display only the first image of the simulation for few seconds.
my problem is that it looks like it recorded only the first frame and keeps playing it for few seconds.
if someone can help me with this one it would be great. thanks!

Best Answer

Solved the problem!!
in order to fix this problem you need to go to (wondows 7):
desktop-> right click->Personalization->display->Adjust resolution->advanced settings->monitor
change your monitor to 16bit.
theres probably a problem when recording at 32bit so try this.
hope i helped!