I would like to know the basic principles and etiquette of writing a well structured code.
Well, if you want it in layman's terms:
I reccomend people to write the shortest readable program that works. 
There are a lot more rules about how to format code, name variables, design classes, separate responsibilities. But you should not forget that all of those rules are only there to make sure that your code is easy to check for errors, and to ensure it is maintainable by someone else than the original author. If keep the above reccomendation in mind, your progam will be just that.
Good practices in writing MATLAB code?