Simulation using Aero.Animation

조회 수: 4 (최근 30일)
ben
ben 2015년 1월 7일
답변: ben 2015년 1월 8일
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