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 Center および File ExchangeGet 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