Version 1.0 (31.1 KB) by Johannes
animate single or multi-unit cars (or tractor / trucks - trailer)


Updated 13 Jun 2018

View License

This toolbox provides several functions and *.m-files to animate single or multi-unit car (or tractor / trucks - trailer) combinations with given trajectories of their center of gravity movements.
Exemplary usage:
% Installation: add the toolbox-functions to the MATLAB search paths
% Create new CarAnim-Struct
carAnim = newCarAnim('name','CarAnim_Test');
% Create an Animation-Window
carAnim = createAnimWindow(carAnim);
% New Car-unit: Tractor
[carAnim id1] = newCarUnit(carAnim);

(... Calc Simulation Results --> trajectories ...)

for idxPlot=1:length(psi_1)
% Update position (Trafo etc.) and draw it
carAnim = updateCarUnitStruct(carAnim,id1,'r_cg',r_1(:,idxPlot), ...
% Redraw object

pause(0.05) % show the user the current figure

Cite As

Johannes (2023). MatCarAnim (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Coordinate Transformations and Trajectories in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

update image
Update Description