Simulation using Aero.Animation

6 次查看(过去 30 天)
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!

采纳的回答

ben
ben 2015-1-8
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!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Aerospace Blockset 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by