MatCarAnim
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
addpathMatCarAnim;
% 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), ...
'psi',psi_1(idxPlot));
% Redraw object
redrawCarAnim(carAnim);
pause(0.05) % show the user the current figure
end
Zitieren als
Johannes (2026). MatCarAnim (https://de.mathworks.com/matlabcentral/fileexchange/67720-matcaranim), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
Tags
Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
CarUnit/
examples/
| Version | Veröffentlicht | Versionshinweise | |
|---|---|---|---|
| 1.0 |
update image
|
|
