M-x octave-mode
It can be done automatically also ... that is for later !
M-x octave-mode
When Auto Fill mode is on, going past the fill column while typing a comment causes the comment to be continued...
When Auto Fill mode is turned off, lines continue to the right as you type them. Depending on how you set the value of truncate-lines, the words you type either disappear off the right side of the screen, or else are shown, in a rather ugly and unreadable manner, as a continuation line on the screen.