Reputation: 4378
Is this possible? It shouldn't be but sometimes its behavior is quite against ordinary programming sense.
Upvotes: 6
Views: 4012
Reputation: 2301
No, Matlab isn't affected by indentation.
They do have editors that will automatically indent the code for you, but it is for readability purposes only. Keeping your code readable with smart-indenting is always a good idea not only for yourself, but for others who may have to read through your code.
Note: Warnings can occur (depending on the IDE) if the indentation isn't consistent, but even sporadic indentation won't affect how your code executes in Matlab.
Upvotes: 8
Reputation:
It'll give you warnings if you don't indent properly. If you make a if or for loop or something like that and the end block isn't inline with it you'll get a possible warning that says the statement might not be aligned with its end block. CRTL+A CTRL+I is easy enough though.
Upvotes: 4