next line, new line! in the text( ) code
Show older comments
I want to write text using text code
text(5,5,['MATLAB','\n']);
but '\n' doesn't work.
I want a textbox consisting of three text lines
Accepted Answer
More Answers (1)
Jan
on 9 Nov 2012
text(5, 5, ['MATLAB', char(10), 'Line 2']);
text(10, 5, {'MATLAB2', 'Line 2'});
1 Comment
Jim Royalty
on 17 May 2017
This answer works. My \n didn't.
Categories
Find more on Annotations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!