Development of a Matlab/Simulink tool to facilitate system analysis and simulation via the adjoint and covariance methods