79833801

Date: 2025-11-30 09:58:41
Score: 1
Natty:
Report link

I know this is an old question, anyway here is some attempt of mine:

https://www.mathworks.com/matlabcentral/fileexchange/182709-mstyleminify

Tested for @RodyOldenhuis cases (transpose, tricky strings) ... not heavily tested otherwise but seems to work fine so far:

example

example

PS: I'm replacing with whitespaces because in my case I'm trying to automate modifying mfiles by adding call to some extrafunction in all main-function / constructor (even if weirdly formatted) of many mfiles ... if you have some idea on that ... mtree/getcallinfo are of help but not to automatically insert code in mfiles.

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @RodyOldenhuis
  • High reputation (-1):
Posted by: CitizenInsane