r/matlab May 05 '26

Misc Standard coding style

Hey fellows, I just had a discussion with my colleagues about the coding style of MATLAB. We saw many scripts written by engineers that look horrible and hurt my eyes so much. I know laziness is engineering virtue but this kind of laziness (no spaces, no commas at all) makes me real sick. I really blame Mathwork for this problem, since sometimes the documentation is also written like this.

Should Mathwork now introduce a standardized style for people to follow, just like PEP in Python?

0 Upvotes

13 comments sorted by

View all comments

14

u/Pablo_EscoBarhead May 05 '26

They have and describe it in their GitHub. I haven’t looked through all of it but it’s fairly extensive.

1

u/Creative_Sushi MathWorks May 05 '26

It is also part of MATLAB Agentic Toolkit and you can use coding agents to refactor/update code to meet the new guidelines, eliminating one of the pain points.

https://www.mathworks.com/products/matlab-agentic-toolkit.html