dialect
- :
name =dialect()¶ - :
prev =dialect(name)¶ Session dialect for user code. name is
"matlab"(the default) or"octave". With no arguments, return the current name. With an argument, set it and return the previous name when the caller asks for a result."matlab"keeps MATLAB R2026a parsing of user files."octave"uses the same dialect as the shipped library for user files and for text passed toeval. A file whose first comment line is%#dialect: octaveopts in on its own, whichever the session is. The same switch is the command-line option--dialect.Setting the session dialect also resets numeric display to the dialect defaults (
format short, loose spacing, five significant digits; nexus#2405 B5) so a priorformat longdoes not carry across the mode boundary. Unmarked MATLAB sessions that never calldialectkeep their existing display state.