This function is used to calculate the steady state error of transfer function of the system
I write the Function Objective on the code
and i see the code is very simple so i don't write comments as it's a simple control theory
Why not provide some description of what this does? Instead, just to guess what it does, I had to edit the code.
Worse, there is little useful help. There is no intelligent H1 line. The first line of this code is the text "Coded by".
Instead, help should tell what the function does, and how to use it. The first contiguous block of comments should be the help, NOT the authors name and e-mail address first.
The very first comment line should be a descriptive line, including natural keywords for this function. That enables several tools in MATLAB, most importantly, the lookfor command.