Simulation using Aero.Animation

1 Ansicht (letzte 30 Tage)
ben
ben am 7 Jan. 2015
Beantwortet: ben am 8 Jan. 2015
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!

Akzeptierte Antwort

ben
ben am 8 Jan. 2015
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!

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with Aerospace Blockset finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by