Nonlinear 6DOF Model of an Underwater Vehicle
hark is a detailed nonlinear model of an underwater vehicle for MATLAB® 5.3 and later (tested on 6.1 as well).
It has a Simulink® interface but the source code consists in 10 MATLAB functions, each one being well documented in an enclosed PDF report.
It is possible to modify the functions to simulate different kind of vehicles and, in general, this tool can be seen as an effective way to map the equations of a mechanical system to a working simulation in the MATLAB and Simulink environment, especially in those cases where the extensive use of a matrix-based formulation in the modeling makes MATLAB (rather than Simulink) the preferred coding environment.
NOTE: After downloading and unzipping the file "shark.zip", please follow the istructions in the file "contents.m".