Matlab: Line Breaks in Strings
Wrap strings with sprintf
to allow the \n
to be escaped correctly.
>> disp('hello\nworld')
hello\nworld
>> disp(sprintf('hello\nworld'))
hello
world
Programming
Matlab
]
Wrap strings with sprintf
to allow the \n
to be escaped correctly.
>> disp('hello\nworld')
hello\nworld
>> disp(sprintf('hello\nworld'))
hello
world
Programming
Matlab
]