Adding incomplete control model code and the original Matlab control model code (for reference)