Reputation: 205
Extremely simple question: how can I format my code to be nicely readable. Example:
A = (B+C+D+E+F+G+H+I+J+K...)
and let's say it is so long that I have to scroll for ages to later see what I wrote. If however I press enter to separate the line like this:
A = (B+C+D+E
+F+G+H+I...)
matlab reports error
Thanks
Upvotes: 5
Views: 169
Reputation: 251
You're looking for "line continuation".
http://www.mathworks.com/help/techdoc/matlab_env/f0-5789.html#f0-5857
Upvotes: 1
Reputation: 2382
Use ...
to split lines:
Instead of a = x + y + z
, you can use:
a = x ...
+ y...
+ z
Upvotes: 6