Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Formatting code nicely

Tags:

matlab

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

like image 598
kojikurac Avatar asked Jul 17 '11 17:07

kojikurac


2 Answers

Use ... at the line break. It is a line continuation.

like image 101
Peter K. Avatar answered Sep 16 '22 20:09

Peter K.


Use ... to split lines:

Instead of a = x + y + z, you can use:

a = x ...
+ y...
+ z
like image 22
Chris Gregg Avatar answered Sep 16 '22 20:09

Chris Gregg